[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Accepted sdl-image1.2 1.2.2-1 (i386 source)



On Wed, Jul 24, 2002 at 03:28:29PM -0500, Marcelo E. Magallon wrote:
> >> "Marcelo E. Magallon" <mmagallo@debian.org> writes:

>  >  0. Recompile libpng2 and libpng3 with versioned symbols.

>  If someone wants to check that I'm not doing anything silly, please
>  take a look at http://people.debian.org/~mmagallo/png/; you'll find
>  source packages for versioned versions of both libpng2 and libpng3.

>  If noone has objections we can start this transition now and hope to be
>  done with it by the end of the year.

The diff for libpng3 looks good -- it's simple, elegant, and easy to
maintain in the long-term, and it gets the job done.

I'm assuming the libpng2 diff is similarly clean, though I haven't
looked.

I don't see any reason not to proceed immediately with this, if the
maintainer doesn't object.

BTW, I'm attaching your diff here for the benefit of others, as it
demonstrates how easy it is to add versioned symbols -- for substantial
gain on the maintainability front.

Cheers,
Steve Langasek
postmodern programmer
diff -uNr libpng3-1.2.1.orig/debian/changelog libpng3-1.2.1/debian/changelog
--- libpng3-1.2.1.orig/debian/changelog	Wed Jul 24 16:23:49 2002
+++ libpng3-1.2.1/debian/changelog	Wed Jul 24 15:54:13 2002
@@ -1,3 +1,13 @@
+libpng3 (1.2.1-1.2) unstable; urgency=low
+
+  * scripts/makefile.linux: create libraries with versioned symbols.  Use the
+    major version of the library as part of the version string.
+  * debian/shlibs: add version information.  Every package compiled a
+    versioned version of the library needs a versioned version of the library
+    at runtime.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Wed, 24 Jul 2002 21:50:56 +0200
+
 libpng3 (1.2.1-1.1) unstable; urgency=low
 
   * NMU
diff -uNr libpng3-1.2.1.orig/debian/shlibs libpng3-1.2.1/debian/shlibs
--- libpng3-1.2.1.orig/debian/shlibs	Wed Jul 24 16:23:49 2002
+++ libpng3-1.2.1/debian/shlibs	Wed Jul 24 15:54:13 2002
@@ -1 +1 @@
-libpng	3	libpng3
+libpng	3	libpng3 (>= 1.2.1-1.2)
diff -uNr libpng3-1.2.1.orig/scripts/makefile.linux libpng3-1.2.1/scripts/makefile.linux
--- libpng3-1.2.1.orig/scripts/makefile.linux	Wed Jul 24 16:23:49 2002
+++ libpng3-1.2.1/scripts/makefile.linux	Wed Jul 24 15:54:13 2002
@@ -65,10 +65,15 @@
 libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
 	ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
 
-libpng.so.$(PNGVER): $(OBJSDLL)
-	$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
+libpng.so.$(PNGVER): $(OBJSDLL) Versions
+	$(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -Wl,--version-script=Versions -o libpng.so.$(PNGVER) \
 	 $(OBJSDLL) -L$(ZLIBLIB) -lz -lm -lc
 
+Versions: $(OBJSDLL)
+	echo 'PNG_$(PNGMAJ) {' > $@
+	nm $(OBJSDLL) | grep " [Tt] " | cut -d" " -f3 | sed -e 's/$$/;/' >> $@
+	echo '};' >> $@
+
 pngtest: pngtest.o libpng.so
 	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
 
@@ -87,7 +92,7 @@
 	 ln -sf libpng.so.$(PNGMAJ) libpng.so)
 
 clean:
-	/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png
+	/bin/rm -f *.o libpng.a libpng.so libpng.so.$(PNGMAJ)* pngtest pngout.png Versions
 
 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 writelock:

Attachment: pgp64IGkzG2gC.pgp
Description: PGP signature


Reply to: