versioning.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. Combines the following two patches adjusted to work with libmypaint 1.3
  2. https://github.com/mypaint/libmypaint/commit/0b31421ffbfb5f4a1c68ceeafa292c6ff08e949c
  3. https://github.com/mypaint/libmypaint/commit/08c4236d4c0e871bf6c29f2e42cafd55d1f361ce
  4. This will allow side-by-side installations of different libmypaint builds
  5. at the level of the minor version number.
  6. diff -Naur ./libmypaint-1.3.0.orig/configure.ac ./libmypaint-1.3.0/configure.ac
  7. --- ./libmypaint-1.3.0.orig/configure.ac 2016-12-01 17:47:14.000000000 -0500
  8. +++ ./libmypaint-1.3.0/configure.ac 2017-07-24 10:54:57.297918118 -0400
  9. @@ -1,27 +1,50 @@
  10. # AC_OPENMP requires autoconf >= 2.62.
  11. AC_PREREQ(2.62)
  12. +
  13. +## Canonical version number components ##
  14. +
  15. # API version: see https://github.com/mypaint/libmypaint/wiki/Versioning
  16. +# See http://semver.org/ for what this means.
  17. +
  18. m4_define([libmypaint_api_major], [1])
  19. m4_define([libmypaint_api_minor], [3])
  20. m4_define([libmypaint_api_micro], [0])
  21. m4_define([libmypaint_api_prerelease], []) # may be blank
  22. -# The platform version is "major.minor" only.
  23. -# The full version is "major.minor.micro[-prerelease]".
  24. -# ABI version see: https://autotools.io/libtool/version.html
  25. +# ABI version. Changes independently of API version.
  26. +# See: https://autotools.io/libtool/version.html
  27. # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
  28. +# The rules are fiddly, and are summarized here.
  29. +
  30. m4_define([libmypaint_abi_revision], [0]) # increment on every release
  31. m4_define([libmypaint_abi_current], [0]) # inc when add/remove/change interfaces
  32. m4_define([libmypaint_abi_age], [0]) # inc only if changes backward compat
  33. -# Derivative version macros
  34. +
  35. +## Derivative version macros ##
  36. +
  37. +# The full version is "major.minor.micro[-prerelease]".
  38. +
  39. m4_define([libmypaint_version],
  40. [libmypaint_api_major.libmypaint_api_minor.libmypaint_api_micro])
  41. m4_define([libmypaint_version_full],
  42. [libmypaint_api_major().libmypaint_api_minor().libmypaint_api_micro()m4_bpatsubst(libmypaint_api_prerelease(), [^\(.\)], [-\1])])
  43. -# Dependencies.
  44. +# The API "platform" or "intercompatibility" version.
  45. +#
  46. +# This one is used for library name prefixes, for introspection
  47. +# namespace versions, for gettext domains, and basically anything that
  48. +# needs to change when backwards or forwards API compatibility changes.
  49. +# Another way of thinking about it: it allows meaningful side by side
  50. +# installations of libmypaint.
  51. +
  52. +m4_define([libmypaint_api_platform_version],
  53. + [libmypaint_api_major.libmypaint_api_minor])
  54. +
  55. +
  56. +## Dependencies ##
  57. +
  58. m4_define([gegl_required_version], [0.3])
  59. m4_define([introspection_required_version], [1.32.0])
  60. @@ -44,7 +67,8 @@
  61. LIBMYPAINT_MICRO_VERSION=libmypaint_api_micro
  62. LIBMYPAINT_VERSION=libmypaint_version
  63. LIBMYPAINT_VERSION_FULL=libmypaint_version_full
  64. -LIBMYPAINT_API_PLATFORM_VERSION=libmypaint_api_major.libmypaint_api_minor
  65. +LIBMYPAINT_API_PLATFORM_VERSION=libmypaint_api_platform_version
  66. +LIBMYPAINT_API_PLATFORM_VERSION_UL=m4_bpatsubst(libmypaint_api_platform_version(), [[^A-Za-z0-9]], [_])
  67. LIBMYPAINT_ABI_VERSION_INFO=libmypaint_abi_current:libmypaint_abi_revision:libmypaint_abi_age
  68. AC_SUBST(LIBMYPAINT_MAJOR_VERSION)
  69. @@ -54,6 +78,7 @@
  70. AC_SUBST(LIBMYPAINT_VERSION)
  71. AC_SUBST(LIBMYPAINT_VERSION_FULL)
  72. AC_SUBST(LIBMYPAINT_API_PLATFORM_VERSION)
  73. +AC_SUBST(LIBMYPAINT_API_PLATFORM_VERSION_UL)
  74. AC_SUBST(LIBMYPAINT_ABI_VERSION_INFO)
  75. AC_PROG_CC
  76. @@ -72,9 +97,8 @@
  77. # Check for pkg-config
  78. PKG_PROG_PKG_CONFIG(0.16)
  79. -###########################
  80. -# Check host architecture
  81. -###########################
  82. +
  83. +## Check host and platform ##
  84. AC_CANONICAL_HOST
  85. @@ -273,7 +297,7 @@
  86. if test "x$enable_i18n" != "xno"; then
  87. enable_i18n="yes"
  88. - GETTEXT_PACKAGE=libmypaint
  89. + GETTEXT_PACKAGE=libmypaint-libmypaint_api_platform_version
  90. AC_SUBST(GETTEXT_PACKAGE)
  91. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
  92. [The prefix for our gettext translation domains.])
  93. @@ -321,9 +345,9 @@
  94. AC_CONFIG_FILES([
  95. doc/Makefile
  96. - gegl/libmypaint-gegl.pc:gegl/libmypaint-gegl.pc.in
  97. + gegl/libmypaint-gegl-]libmypaint_api_platform_version()[.pc:gegl/libmypaint-gegl.pc.in
  98. gegl/Makefile
  99. - libmypaint.pc:libmypaint.pc.in
  100. + libmypaint-]libmypaint_api_platform_version()[.pc:libmypaint.pc.in
  101. m4macros/Makefile
  102. Makefile
  103. po/Makefile.in
  104. diff -Naur ./libmypaint-1.3.0.orig/gegl/Makefile.am ./libmypaint-1.3.0/gegl/Makefile.am
  105. --- ./libmypaint-1.3.0.orig/gegl/Makefile.am 2016-12-01 17:47:14.000000000 -0500
  106. +++ ./libmypaint-1.3.0/gegl/Makefile.am 2017-07-24 10:54:57.297918118 -0400
  107. @@ -37,10 +37,10 @@
  108. ../glib/mypaint-gegl-glib.c \
  109. mypaint-gegl-surface.c
  110. -MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint-gegl.la Makefile
  111. +MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.la Makefile
  112. MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 MyPaint-$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION) Gegl-0.3
  113. MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I. -I..
  114. -MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint-gegl.la ../libmypaint.la
  115. +MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.la ../libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la
  116. MyPaintGegl_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_FILES = $(introspection_sources)
  117. INTROSPECTION_GIRS += MyPaintGegl-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir
  118. @@ -56,10 +56,10 @@
  119. ## pkg-config file ##
  120. pkgconfigdir = $(libdir)/pkgconfig
  121. -pkgconfig_DATA = libmypaint-gegl.pc
  122. +pkgconfig_DATA = libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.pc
  123. ## libmypaint-gegl ##
  124. -lib_LTLIBRARIES = libmypaint-gegl.la
  125. +lib_LTLIBRARIES = libmypaint-gegl-@LIBMYPAINT_API_PLATFORM_VERSION@.la
  126. libmypaint_gegl_publicdir = $(includedir)/libmypaint-gegl
  127. @@ -70,9 +70,9 @@
  128. ../glib/mypaint-gegl-glib.c \
  129. mypaint-gegl-surface.c
  130. -libmypaint_gegl_la_SOURCES = $(libmypaint_gegl_public_HEADERS) $(LIBMYPAINT_GEGL_SOURCES)
  131. +libmypaint_gegl_@LIBMYPAINT_API_PLATFORM_VERSION@_la_SOURCES = $(libmypaint_gegl_public_HEADERS) $(LIBMYPAINT_GEGL_SOURCES)
  132. -libmypaint_gegl_la_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS) $(GEGL_CFLAGS)
  133. -libmypaint_gegl_la_LIBADD = $(top_builddir)/libmypaint.la $(GEGL_LIBS)
  134. +libmypaint_gegl_@LIBMYPAINT_API_PLATFORM_VERSION@_la_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS) $(GEGL_CFLAGS)
  135. +libmypaint_gegl_@LIBMYPAINT_API_PLATFORM_VERSION@_la_LIBADD = $(top_builddir)/libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la $(GEGL_LIBS)
  136. endif # enable_gegl
  137. diff -Naur ./libmypaint-1.3.0.orig/.gitignore ./libmypaint-1.3.0/.gitignore
  138. --- ./libmypaint-1.3.0.orig/.gitignore 2016-12-01 17:47:14.000000000 -0500
  139. +++ ./libmypaint-1.3.0/.gitignore 2017-07-24 10:54:57.297918118 -0400
  140. @@ -39,8 +39,8 @@
  141. .libs/
  142. *.lo
  143. -libmypaint.la
  144. -gegl/libmypaint-gegl.la
  145. +libmypaint-*.la
  146. +gegl/libmypaint-gegl-*.la
  147. po/*.gmo
  148. po/Makefile*
  149. diff -Naur ./libmypaint-1.3.0.orig/libmypaint.pc.in ./libmypaint-1.3.0/libmypaint.pc.in
  150. --- ./libmypaint-1.3.0.orig/libmypaint.pc.in 2016-12-01 17:47:14.000000000 -0500
  151. +++ ./libmypaint-1.3.0/libmypaint.pc.in 2017-07-24 10:54:57.297918118 -0400
  152. @@ -8,5 +8,5 @@
  153. URL: @PACKAGE_URL@
  154. Version: @LIBMYPAINT_VERSION@
  155. Requires: @PKG_CONFIG_REQUIRES@
  156. -Cflags: -I${includedir}/libmypaint
  157. -Libs: -L${libdir} -lmypaint @OPENMP_CFLAGS@
  158. +Cflags: -I${includedir}/libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@
  159. +Libs: -L${libdir} -lmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@ @OPENMP_CFLAGS@
  160. diff -Naur ./libmypaint-1.3.0.orig/Makefile.am ./libmypaint-1.3.0/Makefile.am
  161. --- ./libmypaint-1.3.0.orig/Makefile.am 2016-12-01 17:47:14.000000000 -0500
  162. +++ ./libmypaint-1.3.0/Makefile.am 2017-07-24 10:54:57.297918118 -0400
  163. @@ -13,7 +13,7 @@
  164. --warn-all \
  165. --pkg="glib-2.0" \
  166. --namespace="MyPaint" \
  167. - --nsversion="$(LIBMYPAINT_MAJOR_VERSION).$(LIBMYPAINT_MINOR_VERSION)" \
  168. + --nsversion="$(LIBMYPAINT_API_PLATFORM_VERSION)" \
  169. --identifier-prefix="MyPaint" \
  170. --symbol-prefix="mypaint_" \
  171. --add-include-path="$(srcdir)" \
  172. @@ -54,12 +54,13 @@
  173. mypaint-tiled-surface.c \
  174. tilemap.c
  175. -MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir: libmypaint.la Makefile
  176. -MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 GLib-2.0
  177. -MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  178. -MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_LIBS = libmypaint.la
  179. -MyPaint_@LIBMYPAINT_MAJOR_VERSION@_@LIBMYPAINT_MINOR_VERSION@_gir_FILES = $(introspection_sources)
  180. -INTROSPECTION_GIRS += MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir
  181. +# CAUTION: some of these need to use the underscored API version string.
  182. +MyPaint-@LIBMYPAINT_API_PLATFORM_VERSION@.gir: libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la Makefile
  183. +MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_INCLUDES = GObject-2.0 GLib-2.0
  184. +MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  185. +MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_LIBS = libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la
  186. +MyPaint_@LIBMYPAINT_API_PLATFORM_VERSION_UL@_gir_FILES = $(introspection_sources)
  187. +INTROSPECTION_GIRS += MyPaint-@LIBMYPAINT_API_PLATFORM_VERSION@.gir
  188. girdir = $(datadir)/gir-1.0
  189. gir_DATA = $(INTROSPECTION_GIRS)
  190. @@ -75,22 +76,23 @@
  191. pkgconfigdir = $(libdir)/pkgconfig
  192. -pkgconfig_DATA = libmypaint.pc
  193. +pkgconfig_DATA = libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.pc
  194. -## libmypaint ##
  195. +## libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@ ##
  196. AM_CFLAGS = $(JSON_CFLAGS) $(GLIB_CFLAGS)
  197. LIBS = $(JSON_LIBS) $(GLIB_LIBS) @LIBS@
  198. -lib_LTLIBRARIES = libmypaint.la
  199. +lib_LTLIBRARIES = libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la
  200. -libmypaint_la_LDFLAGS = \
  201. - -release @LIBMYPAINT_API_PLATFORM_VERSION@ \
  202. +libmypaint_@LIBMYPAINT_API_PLATFORM_VERSION@_la_LDFLAGS = \
  203. -version-info @LIBMYPAINT_ABI_VERSION_INFO@ \
  204. -no-undefined
  205. -libmypaint_publicdir = $(includedir)/libmypaint
  206. +# -release @LIBMYPAINT_API_PLATFORM_VERSION@
  207. +
  208. +libmypaint_publicdir = $(includedir)/libmypaint-$(LIBMYPAINT_API_PLATFORM_VERSION)
  209. nobase_libmypaint_public_HEADERS = \
  210. mypaint-config.h \
  211. @@ -117,9 +119,9 @@
  212. tilemap.c \
  213. utils.c
  214. -libmypaint_la_SOURCES = $(libmypaint_public_HEADERS) $(LIBMYPAINT_SOURCES)
  215. +libmypaint_@LIBMYPAINT_API_PLATFORM_VERSION@_la_SOURCES = $(libmypaint_public_HEADERS) $(LIBMYPAINT_SOURCES)
  216. -DISTCLEANFILES = MyPaint-@LIBMYPAINT_MAJOR_VERSION@.@LIBMYPAINT_MINOR_VERSION@.gir.files
  217. +DISTCLEANFILES = MyPaint-@LIBMYPAINT_API_PLATFORM_VERSION@.gir.files
  218. EXTRA_DIST = \
  219. brushsettings.json \
  220. diff -Naur ./libmypaint-1.3.0.orig/tests/Makefile.am ./libmypaint-1.3.0/tests/Makefile.am
  221. --- ./libmypaint-1.3.0.orig/tests/Makefile.am 2016-12-01 17:47:14.000000000 -0500
  222. +++ ./libmypaint-1.3.0/tests/Makefile.am 2017-07-24 10:54:57.297918118 -0400
  223. @@ -41,7 +41,7 @@
  224. LDADD = \
  225. $(DEPS) \
  226. libmypaint-tests.a \
  227. - $(top_builddir)/libmypaint.la
  228. + $(top_builddir)/libmypaint-@LIBMYPAINT_API_PLATFORM_VERSION@.la
  229. EXTRA_DIST = \
  230. brushes/bulk.myb \