On Sat, Nov 28, 2009 at 09:56:56AM +0100, Bartosz Fenski aka fEnIo wrote:
> On Fri, Nov 27, 2009 at 08:23:30PM -0500, Reid Barton wrote:
> > > > > The potrace source also seem to contain a libpotrace, which is
> > > > > fromexample used by dvisvgm.  Could you please also build libpotrace
> > > > > and libpotrace-dev packages?
> > > > 
> > > > By default upstream's build infrastructure builds only static library.
> > > > Would it be enough for you or should I ask him to provide dynamic 
> > > > library
> > > > too?
> > > 
> > > No, I really need the dynamic library.
> > 
> > I would quite like a libpotrace package as well.  I did manage to
> > build a shared library manually without too much difficulty, but I
> > didn't really understand what I was doing with regards to the build
> > system and it would be most convenient for me if the dynamic library
> > was packaged by Debian for easy installation everywhere.
> 
> Just enlight me how did you do that ;)

I applied the attached patch and then ran 'autoreconf -i -s'.  A
subsequent 'fakeroot make -f debian/rules install' produces a dynamic
library and a potrace binary linked against it.  It doesn't yet
install the header file potracelib.h.  I hope that's straightforward
to fix.

Regards,
Reid Barton
diff -Naur potrace-1.8/configure.in potrace-1.8-shlib3/configure.in
--- potrace-1.8/configure.in	2007-04-08 20:27:12.000000000 -0400
+++ potrace-1.8-shlib3/configure.in	2009-11-28 21:00:45.000000000 -0500
@@ -42,7 +42,7 @@
 
 AC_PROG_RANLIB
 dnl AC_LIBTOOL_WIN32_DLL
-dnl AC_PROG_LIBTOOL
+AC_PROG_LIBTOOL
 
 dnl ----------------------------------------------------------------------
 dnl check for compiler bugs. 
diff -Naur potrace-1.8/src/Makefile.am potrace-1.8-shlib3/src/Makefile.am
--- potrace-1.8/src/Makefile.am	2007-04-08 20:36:44.000000000 -0400
+++ potrace-1.8-shlib3/src/Makefile.am	2009-11-28 21:01:05.000000000 -0500
@@ -16,8 +16,8 @@
  backend_gimp.c backend_gimp.h backend_xfig.c backend_xfig.h		   \
  backend_pdf.c backend_pdf.h lzw.c lzw.h bitops.h auxiliary.h potracelib.h \
  bitmap.h curve.h platform.h progress.h
-potrace_LDADD = libpotrace.a @EXTRA_OBJS@ -lm @EXTRA_LIBS@
-potrace_DEPENDENCIES = libpotrace.a @EXTRA_OBJS@
+potrace_LDADD = libpotrace.la @EXTRA_OBJS@ -lm @EXTRA_LIBS@
+potrace_DEPENDENCIES = libpotrace.la @EXTRA_OBJS@
 
 mkbitmap_SOURCES = mkbitmap.c bitmap_io.c bitmap_io.h greymap.c	\
  greymap.h platform.h
@@ -25,25 +25,25 @@
 mkbitmap_DEPENDENCIES = @EXTRA_OBJS@
 
 potracelib_demo_SOURCES = potracelib_demo.c
-potracelib_demo_LDADD = libpotrace.a -lm
-potracelib_demo_DEPENDENCIES = libpotrace.a
+potracelib_demo_LDADD = libpotrace.la -lm
+potracelib_demo_DEPENDENCIES = libpotrace.la
 
 #----------------------------------------------------------------------
 # static libraries:
 
-noinst_LIBRARIES = libpotrace.a
-libpotrace_a_SOURCES = curve.c curve.h trace.c trace.h decompose.c	\
- decompose.h potracelib.c potracelib.h lists.h auxiliary.h bitmap.h	\
- progress.h
+#noinst_LIBRARIES = libpotrace.a
+#libpotrace_a_SOURCES = curve.c curve.h trace.c trace.h decompose.c	\
+# decompose.h potracelib.c potracelib.h lists.h auxiliary.h bitmap.h	\
+# progress.h
 
 #----------------------------------------------------------------------
 # dynamic libraries:
 
-#lib_LTLIBRARIES = libpotrace.la
-#libpotrace_la_SOURCES = curve.c curve.h trace.c trace.h decompose.c	\
-# decompose.h potracelib.c potracelib.h lists.h auxiliary.h bitmap.h    \
-# progress.h
-#libpotrace_la_LDFLAGS = -version-info 0:0:0
+lib_LTLIBRARIES = libpotrace.la
+libpotrace_la_SOURCES = curve.c curve.h trace.c trace.h decompose.c	\
+ decompose.h potracelib.c potracelib.h lists.h auxiliary.h bitmap.h    \
+ progress.h
+libpotrace_la_LDFLAGS = -version-info 0:0:0
 
 #----------------------------------------------------------------------
 # other stuff to distribute

Reply via email to