Hi,
attached patch will introduce MODGNUSTEP_OBJC, and use it in the ports WANTLIB
where needed.
For now, MODGNUSTEP_OBJC = objc in gnustep.port.mk.
A couple of gnustep related ports have WANTLIB += objc.
At some point in time, hope not too far in the future, I want to introduce
libobjc2, which will be named libobjc2. However, since as far as I can see it
will not work on all architectures, some have to link against libobjc (or
libobjc1).
This patch below is just a preparation, for this architecture dependency,
allows me to surround MODGNUSTEP_OBJC with .ifdef ${MACHINE_ARCH} ...
The first part contains patch to gnustep.port.mk and to the Makefiles of the
few ports that had objc in its WANTLIB.
Only gnustep base needed some more special tweak and an additional patch to
configure and SUBST_CMD to correctly detect which libobjc is the right one to
use at configure stage. Didn't bumped it, since it doesn't do anything to the
package itself.
The second part contains patches to the Makefiles of the three other gnustep
related ports, not under x11/gnustep.
Since there is no change to a package, no bump at all. Bumps will then be
needed later when switching to other libobjc runtimes.
Is that OK?
Sebastian
Index: gnustep.port.mk
===================================================================
RCS file: /cvs/ports/x11/gnustep/gnustep.port.mk,v
retrieving revision 1.16
diff -u -r1.16 gnustep.port.mk
--- gnustep.port.mk 19 Jul 2011 06:19:49 -0000 1.16
+++ gnustep.port.mk 4 Jan 2012 18:12:57 -0000
@@ -20,12 +20,14 @@
MAKE_ENV += INSTALL_AS_GROUP=${BINGRP}
MAKE_ENV += GS_DEFAULTS_LOCKDIR=${WRKDIR}
+MODGNUSTEP_OBJC = objc
+
MODGNUSTEP_NEEDS_BASE ?= Yes
MODGNUSTEP_NEEDS_GUI ?= Yes
MODGNUSTEP_NEEDS_BACK ?= Yes
.if ${MODGNUSTEP_NEEDS_GUI:L} == yes
-MODGNUSTEP_WANTLIB += objc gnustep-base gnustep-gui
+MODGNUSTEP_WANTLIB += ${MODGNUSTEP_OBJC} gnustep-base gnustep-gui
MODGNUSTEP_LIB_DEPENDS += x11/gnustep/gui
. if ${MODGNUSTEP_NEEDS_BACK:L} == yes
MODGNUSTEP_RUN_DEPENDS += x11/gnustep/back
Index: base/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnustep/base/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- base/Makefile 16 Sep 2011 12:29:15 -0000 1.40
+++ base/Makefile 4 Jan 2012 18:12:57 -0000
@@ -13,8 +13,8 @@
HOMEPAGE= http://www.gnustep.org/
-WANTLIB += c crypto gcrypt m objc pthread ssl xml2 z ffi gmp xslt gnutls
-WANTLIB += avahi-client avahi-common icudata icui18n icuuc
+WANTLIB += c crypto gcrypt m pthread ssl xml2 z ffi gmp xslt gnutls
+WANTLIB += avahi-client avahi-common icudata icui18n icuuc ${MODGNUSTEP_OBJC}
.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "amd64"
WANTLIB += iberty
@@ -38,9 +38,11 @@
CONFIGURE_ARGS += --disable-procfs \
--disable-procfs-psinfo
+SUBST_VARS += MODGNUSTEP_OBJC
pre-configure:
@perl -pi -e
's,^MAJOR_VERSION=.*,MAJOR_VERSION=${LIBgnustep-base_VERSION:R},g;' \
-e
's,^MINOR_VERSION=.*,MINOR_VERSION=${LIBgnustep-base_VERSION:E},g' \
${WRKSRC}/Version
+ ${SUBST_CMD} ${WRKSRC}/configure
.include <bsd.port.mk>
Index: base/patches/patch-configure
===================================================================
RCS file: base/patches/patch-configure
diff -N base/patches/patch-configure
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ base/patches/patch-configure 4 Jan 2012 18:12:57 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- configure.orig Wed Dec 28 15:36:34 2011
++++ configure Wed Dec 28 15:37:22 2011
+@@ -5400,7 +5400,7 @@ $as_echo_n "checking the Objective-C runtime... " >&6;
+ if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
+ { $as_echo "$as_me:$LINENO: result: NeXT" >&5
+ $as_echo "NeXT" >&6; }
+- LIBOBJC='-lobjc'
++ LIBOBJC='-l${MODGNUSTEP_OBJC}'
+ OBJCFLAGS="$OBJCFLAGS -fnext-runtime -DNeXT_RUNTIME"
+ elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
+ { $as_echo "$as_me:$LINENO: result: GNU" >&5
+@@ -5411,7 +5411,7 @@ $as_echo "GNU" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: GNU" >&5
+ $as_echo "GNU" >&6; }
+- LIBOBJC='-lobjc'
++ LIBOBJC='-l${MODGNUSTEP_OBJC}'
+ OBJCFLAGS="$OBJCFLAGS -fgnu-runtime"
+ fi
+
Index: dbuskit/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnustep/dbuskit/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- dbuskit/Makefile 14 May 2011 08:32:30 -0000 1.1.1.1
+++ dbuskit/Makefile 4 Jan 2012 18:12:57 -0000
@@ -15,7 +15,8 @@
MODULES += x11/gnustep
MODGNUSTEP_NEEDS_GUI = No
-WANTLIB += c dbus-1 m pthread gnustep-base objc
+WANTLIB += c dbus-1 m pthread gnustep-base
+WANTLIB += ${MODGNUSTEP_OBJC}
BUILD_DEPENDS += print/texlive/base \
textproc/texi2html
Index: gui/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnustep/gui/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- gui/Makefile 18 Apr 2011 11:56:01 -0000 1.24
+++ gui/Makefile 4 Jan 2012 18:12:58 -0000
@@ -12,7 +12,7 @@
HOMEPAGE= http://www.gnustep.org/
-WANTLIB += objc gnustep-base asn1 crypto gssapi krb5 ssl stdc++
+WANTLIB += ${MODGNUSTEP_OBJC} gnustep-base asn1 crypto gssapi krb5 ssl stdc++
WANTLIB += tiff z ao jpeg ungif png cups aspell c m pthread sndfile
MASTER_SITES= ${MASTER_SITE_GNUSTEP:=core/}
Index: renaissance/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnustep/renaissance/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- renaissance/Makefile 19 Jul 2011 13:52:40 -0000 1.1.1.1
+++ renaissance/Makefile 4 Jan 2012 18:12:58 -0000
@@ -13,7 +13,7 @@
MASTER_SITES = ${HOMEPAGE:=Download/}
MODULES = x11/gnustep
-WANTLIB += c gnustep-base gnustep-gui m objc pthread
+WANTLIB += c gnustep-base gnustep-gui m pthread ${MODGNUSTEP_OBJC}
MAKE_FLAGS = Renaissance_INTERFACE_VERSION=${LIBRenaissance_VERSION}
Index: sqlclient/Makefile
===================================================================
RCS file: /cvs/ports/x11/gnustep/sqlclient/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- sqlclient/Makefile 15 Oct 2011 08:02:23 -0000 1.2
+++ sqlclient/Makefile 4 Jan 2012 18:12:58 -0000
@@ -17,7 +17,7 @@
MODULES = x11/gnustep
MODGNUSTEP_NEEDS_GUI = No
WANTLIB += Performance pq ecpg mysqlclient sqlite3
-WANTLIB += gnustep-base m objc
+WANTLIB += gnustep-base m ${MODGNUSTEP_OBJC}
LIB_DEPENDS += x11/gnustep/performance \
databases/mysql \
databases/postgresql \
Index: games/oolite/Makefile
===================================================================
RCS file: /cvs/ports/games/oolite/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- games/oolite/Makefile 18 Apr 2011 12:19:21 -0000 1.5
+++ games/oolite/Makefile 4 Jan 2012 18:15:37 -0000
@@ -27,7 +27,8 @@
LIB_DEPENDS= devel/sdl-mixer \
graphics/png
-WANTLIB += GL GLU SDL c m pthread SDL_mixer objc gnustep-base png
+WANTLIB += GL GLU SDL c m pthread SDL_mixer gnustep-base png
+WANTLIB += ${MODGNUSTEP_OBJC}
MAKE_FILE = Makefile
ALL_TARGET= release
Index: www/sope/Makefile
===================================================================
RCS file: /cvs/ports/www/sope/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- www/sope/Makefile 18 Nov 2011 11:12:44 -0000 1.19
+++ www/sope/Makefile 4 Jan 2012 18:15:37 -0000
@@ -35,12 +35,13 @@
MODULES= converters/libiconv x11/gnustep
MODGNUSTEP_NEEDS_GUI= No
-WANTLIB-main = gnustep-base m objc c pthread crypto ssl z lber
ldap xml2 \
- ${MODLIBICONV_WANTLIB}
+WANTLIB-main = gnustep-base m c pthread crypto ssl z lber ldap
xml2 \
+ ${MODLIBICONV_WANTLIB} ${MODGNUSTEP_OBJC}
-WANTLIB-mysql = gnustep-base m objc GDLAccess EOControl \
- mysqlclient crypto ssl z
-WANTLIB-postgres = gnustep-base m objc GDLAccess EOControl pq
+WANTLIB-mysql = gnustep-base m GDLAccess EOControl \
+ mysqlclient crypto ssl z ${MODGNUSTEP_OBJC}
+WANTLIB-postgres = gnustep-base m GDLAccess EOControl pq \
+ ${MODGNUSTEP_OBJC}
LIB_DEPENDS-main= x11/gnustep/base \
databases/openldap \
Index: www/sogo/Makefile
===================================================================
RCS file: /cvs/ports/www/sogo/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- www/sogo/Makefile 18 Nov 2011 11:15:13 -0000 1.17
+++ www/sogo/Makefile 4 Jan 2012 18:15:37 -0000
@@ -29,7 +29,7 @@
WANTLIB += c m pthread crypto memcached WOExtensions SBJson
WANTLIB += DOM EOControl GDLAccess NGExtensions NGLdap XmlRpc
WANTLIB += NGMime NGObjWeb NGStreams SaxObjC WEExtensions
-WANTLIB += objc gnustep-base
+WANTLIB += ${MODGNUSTEP_OBJC} gnustep-base
LIB_DEPENDS += devel/libmemcached \
www/sope