summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2014-05-03 21:34:20 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2014-05-03 21:34:20 +0800
commit2ac5303101c99e10b626bebda4fecabd6a35f7ac (patch)
tree228e7773cc800b1c3f814dd45726ca045dfa386a
parent1ba2a518933dbd4d24362ad8adac882d6302d29f (diff)
downloadmarcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.tar
marcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.tar.gz
marcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.tar.bz2
marcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.tar.lz
marcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.tar.xz
marcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.tar.zst
marcuscom-ports-2ac5303101c99e10b626bebda4fecabd6a35f7ac.zip
Un-jump the shark for the ltverhack removal, it still widely in use ..\
Add it back while ltverhack removal continues, Sorry. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@19606 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--Mk/bsd.gnome.mk56
1 files changed, 55 insertions, 1 deletions
diff --git a/Mk/bsd.gnome.mk b/Mk/bsd.gnome.mk
index 7269e48c2..fd31215fe 100644
--- a/Mk/bsd.gnome.mk
+++ b/Mk/bsd.gnome.mk
@@ -69,7 +69,7 @@ Gnome_Pre_Include= bsd.gnome.mk
# non-version specific components
_USE_GNOME_ALL= esound intlhack intltool introspection \
- gnomehack referencehack gnomehier gnomemimedata \
+ ltverhack gnomehack referencehack gnomehier gnomemimedata \
gnomeprefix
# GNOME 1 components
@@ -700,6 +700,48 @@ _USE_GNOME+= ${${component}_USE_GNOME_IMPL} ${component}
PLIST_SUB+= GTK2_VERSION="${GTK2_VERSION}" \
GTK3_VERSION="${GTK3_VERSION}"
+# Then handle the ltverhack component (it has to be done here, because
+# we rely on some bsd.autotools.mk variables, and bsd.autotools.mk is
+# included in the post-makefile section).
+.if defined(_AUTOTOOL_libtool)
+lthacks_CONFIGURE_ENV= ac_cv_path_DOLT_BASH=
+lthacks_PRE_PATCH= \
+ ${CP} -pf ${LTMAIN} ${WRKDIR}/gnome-ltmain.sh && \
+ ${CP} -pf ${LIBTOOL} ${WRKDIR}/gnome-libtool && \
+ for file in ${LIBTOOLFILES}; do \
+ ${REINPLACE_CMD} -e \
+ '/^ltmain=/!s|$$ac_aux_dir/ltmain\.sh|${LIBTOOLFLAGS} ${WRKDIR}/gnome-ltmain.sh|g; \
+ /^LIBTOOL=/s|$$(top_builddir)/libtool|${WRKDIR}/gnome-libtool|g' \
+ ${PATCH_WRKSRC}/$$file; \
+ done;
+.endif
+
+.if ${USE_GNOME:Mltverhack\:*:C/^[^:]+:([^:]+).*/\1/}==""
+ltverhack_LIB_VERSION= major=.`expr $$current - $$age`
+.else
+ltverhack_LIB_VERSION= major=".${USE_GNOME:Mltverhack\:*:C/^[^:]+:([^:]+).*/\1/}"
+.endif
+
+.if defined(USE_AUTOTOOLS) && ${USE_AUTOTOOLS:Mlibtool*}
+ltverhack_PATCH_DEPENDS=${LIBTOOL_DEPENDS}
+ltverhack_PATCH_FILES= ../gnome-ltmain.sh ../gnome-libtool
+.else
+ltverhack_PATCH_FILES?= ltmain.sh libtool
+.endif
+
+ltverhack_PRE_PATCH= \
+ for file in ${ltverhack_PATCH_FILES}; do \
+ if [ -f ${WRKSRC}/$$file ]; then \
+ ${REINPLACE_CMD} -e \
+ '/freebsd-elf)/,/;;/ s|major="\.$$current"|${ltverhack_LIB_VERSION}|; \
+ /freebsd-elf)/,/;;/ s|versuffix="\.$$current"|versuffix="$$major"|' \
+ -e \
+ '/freebsd-elf)/,/;;/ s|major=\.$$current|${ltverhack_LIB_VERSION}|; \
+ /freebsd-elf)/,/;;/ s|versuffix=\.$$current|versuffix="$$major"|' \
+ ${WRKSRC}/$$file; \
+ fi; \
+ done
+
# Set USE_CSTD for all ports that depend on glib12
.if defined(_USE_GNOME) && !empty(_USE_GNOME:Mglib12)
USE_CSTD= gnu89
@@ -709,6 +751,18 @@ USE_CSTD= gnu89
# exist in ${_USE_GNOME} and set variables accordingly
.ifdef _USE_GNOME
+# this is splitted out from the above entry because fmake trows a fit otherwise
+. if defined(USE_AUTOTOOLS) && ${USE_AUTOTOOLS:Mlibtool*}
+. if ${USE_GNOME:Mltverhack*}!= ""
+_GNOME_NEED_LIBTOOL=1
+. endif
+. endif
+
+. if defined(_GNOME_NEED_LIBTOOL)
+GNOME_PRE_PATCH+= ${lthacks_PRE_PATCH}
+CONFIGURE_ENV+= ${lthacks_CONFIGURE_ENV}
+. endif
+
. for component in ${_USE_GNOME:O:u}
. if defined(${component}_PATCH_DEPENDS)
PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS}