Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#11606 closed update (fixed)

UPDATE: neon universal support

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: danielluke (Daniel J. Luke)
Priority: Low Milestone:
Component: ports Version:
Keywords: Cc: danielluke (Daniel J. Luke), ryandesign (Ryan Carsten Schmidt)
Port:

Description

May I suggest the attached patch which allows the neon port to build universally.

I am using MacPorts from trunk, currently called version 1.5.

Attachments (2)

neon-universal.diff (677 bytes) - added by ryandesign (Ryan Carsten Schmidt) 17 years ago.
neon-universal.2.diff (883 bytes) - added by pipping@… 17 years ago.
new patch

Download all attachments as: .zip

Change History (13)

Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: neon-universal.diff added

comment:1 Changed 17 years ago by pipping@…

doesn't work:

$sudo port -q destroot
$file work/destroot/opt/local/lib/libneon.26.0.3.dylib
work/destroot/opt/local/lib/libneon.26.0.3.dylib: Mach-O dynamically linked shared library ppc

$svn diff .
Index: Portfile
===================================================================
--- Portfile    (revision 23051)
+++ Portfile    (working copy)
@@ -29,6 +29,16 @@
                 --with-expat \
                 --mandir=\\\${prefix}/share/man
 
+if {[llength [info commands configure.universal_ldflags-append]] > 0} {
+       configure.universal_ldflags-append -L$prefix/lib
+} else {
+       variant universal {
+               return -code error "You need to be running MacPorts 1.4.0 or higher to \
+               use this variant (universal)."
+       }
+}
+
+
 destroot.destdir    prefix=${destroot}${prefix}
 
 test.env    DYLD_LIBRARY_PATH=`find ${worksrcpath} -type d -name .libs | xargs echo | sed -e 's/ /:/g'`

I'm running the latest version from the trunk.

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Does work for me on Intel:

$ sudo port install neon +universal
Warning: This port already overrides CFLAGS or LDFLAGS. The universal variant may break it.
--->  Fetching neon
--->  Verifying checksum(s) for neon
--->  Extracting neon
--->  Configuring neon
--->  Building neon with target all
--->  Staging neon into destroot
--->  Installing neon 0.26.3_0+universal
--->  Activating neon 0.26.3_0+universal
--->  Cleaning neon
$ file /opt/local/lib/libneon.26.0.3.dylib 
/opt/local/lib/libneon.26.0.3.dylib: Mach-O universal binary with 2 architectures
/opt/local/lib/libneon.26.0.3.dylib (for architecture i386):    Mach-O dynamically linked shared library i386
/opt/local/lib/libneon.26.0.3.dylib (for architecture ppc):     Mach-O dynamically linked shared library ppc
$ svn di
Index: Portfile
===================================================================
--- Portfile    (revision 23044)
+++ Portfile    (working copy)
@@ -29,6 +29,16 @@
                 --with-expat \
                 --mandir=\\\${prefix}/share/man
 
+if {[llength [info commands configure.universal_ldflags-append]] > 0} {
+       configure.universal_ldflags-append -L$prefix/lib
+} else {
+       variant universal {
+               return -code error "You need to be running MacPorts 1.4.0 or higher to \
+               use this variant (universal)."
+       }
+}
+
+
 destroot.destdir    prefix=${destroot}${prefix}
 
 test.env    DYLD_LIBRARY_PATH=`find ${worksrcpath} -type d -name .libs | xargs echo | sed -e 's/ /:/g'`
$ 

But I see you're on PowerPC. Probably the CPPFLAGS/CXXFLAGS. I will test a fix to this, but I will have to build all of neon's dependencies universal too on my PowerPC machine, so it will take awhile.

comment:3 Changed 17 years ago by pipping@…

sorry, i made a silly mistake. it works!

comment:4 Changed 17 years ago by pipping@…

by the way... i'm only able to verify the dependency on expat, openssl and zlib. does the port really depend on gettext (and libiconv)?

comment:5 Changed 17 years ago by pipping@…

i've appended a new patch to strip the arch, isysroot parameters from neon-config. otherwise, non-universal ports would be forced to build universal when using the libs suplied by neon-config --libs (see [22854]).

Changed 17 years ago by pipping@…

Attachment: neon-universal.2.diff added

new patch

comment:6 Changed 17 years ago by pipping@…

Milestone: Available PortsPort Updates

comment:7 Changed 17 years ago by pipping@…

Resolution: fixed
Status: newclosed

fixed in r23095.

comment:8 Changed 17 years ago by danielluke (Daniel J. Luke)

I've got both libiconv and libintl in the otool output for neon:

% otool -L /opt/local/lib/libneon.dylib /opt/local/lib/libneon.dylib:

/opt/local/lib/libneon.26.dylib (compatibility version 27.0.0, current version 27.3.0) /opt/local/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.1.0) /opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /opt/local/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /opt/local/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 369.2.0) /opt/local/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.7)

... and it would have been nice if we had followed policy for updates (I like to build-test my ports in a few environments to make sure they're OK especially with subversion-releated ports as many people tend to email me if anything is broken :) ) ... I would have been able to update the port today (looks like we only waited 36 hours on a weekend and the update doesn't fix a normal build or security problem)...

comment:9 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Then... something may be wrong, because when compiled universal, my neon isn't linked to libiconv or libintl, but when not compiled universal, it is. My libiconv and gettext are compiled universal. I even just uninstalled expat, libiconv and gettext and rebuild them universal in case anything had changed recently.

$ port installed neon
The following ports are currently installed:
  neon @0.26.3_0 (active)
  neon @0.26.3_0+universal
$ otool -L /opt/local/lib/libneon.dylib 
/opt/local/lib/libneon.dylib:
        /opt/local/lib/libneon.26.dylib (compatibility version 27.0.0, current version 27.3.0)
        /opt/local/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.1.0)
        /opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /opt/local/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
        /opt/local/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
        /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 369.6.0)
        /opt/local/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.6)
$ port installed neon
The following ports are currently installed:
  neon @0.26.3_0
  neon @0.26.3_0+universal (active)
$ otool -L /opt/local/lib/libneon.dylib 
/opt/local/lib/libneon.dylib:
        /opt/local/lib/libneon.26.dylib (compatibility version 27.0.0, current version 27.3.0)
        /opt/local/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
        /opt/local/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
        /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 369.6.0)
        /opt/local/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)

comment:10 Changed 15 years ago by jmroot (Joshua Root)

Type: enhancementupdate

comment:11 Changed 15 years ago by (none)

Milestone: Port Updates

Milestone Port Updates deleted

Note: See TracTickets for help on using tickets.