aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2000-08-10 20:36:27 +0800
committerknu <knu@FreeBSD.org>2000-08-10 20:36:27 +0800
commit67c41c102ac14d187223fea0c35aafc52d1d63a2 (patch)
treed13fe1e273ef0528de0699f492054f60261bcef4
parent1dd479041fb16f53a9b89827360e8c1475e1fcf1 (diff)
downloadfreebsd-ports-gnome-67c41c102ac14d187223fea0c35aafc52d1d63a2.tar.gz
freebsd-ports-gnome-67c41c102ac14d187223fea0c35aafc52d1d63a2.tar.zst
freebsd-ports-gnome-67c41c102ac14d187223fea0c35aafc52d1d63a2.zip
Make this build and install the shared library (libexpat.so) too.
External programs/interfaces might want that. Approved by: dirk (MAINTAINER)
-rw-r--r--textproc/expat/Makefile6
-rw-r--r--textproc/expat/pkg-plist2
-rw-r--r--textproc/expat2/Makefile6
-rw-r--r--textproc/expat2/files/patch-aa38
-rw-r--r--textproc/expat2/pkg-plist2
5 files changed, 46 insertions, 8 deletions
diff --git a/textproc/expat/Makefile b/textproc/expat/Makefile
index 5aa0ad6c36bd..a01169965a1a 100644
--- a/textproc/expat/Makefile
+++ b/textproc/expat/Makefile
@@ -16,11 +16,17 @@ MAINTAINER= dirk@FreeBSD.org
USE_ZIP= yes
+SHLIB_MAJOR= 1
+
+PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}"
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xmlwf/xmlwf ${PREFIX}/bin
${MKDIR} ${PREFIX}/include/xml
${INSTALL_DATA} ${WRKSRC}/xmlparse/xmlparse.h ${PREFIX}/include/xml
${INSTALL_DATA} ${WRKSRC}/xmltok/xmltok.h ${PREFIX}/include/xml
${INSTALL_DATA} ${WRKSRC}/libexpat.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libexpat.so ${PREFIX}/lib/libexpat.so.${SHLIB_MAJOR}
+ ${LN} -s libexpat.so.${SHLIB_MAJOR} ${PREFIX}/lib/libexpat.so
.include <bsd.port.mk>
diff --git a/textproc/expat/pkg-plist b/textproc/expat/pkg-plist
index e8658c72b36c..9aa0f13a1918 100644
--- a/textproc/expat/pkg-plist
+++ b/textproc/expat/pkg-plist
@@ -2,4 +2,6 @@ bin/xmlwf
include/xml/xmlparse.h
include/xml/xmltok.h
lib/libexpat.a
+lib/libexpat.so
+lib/libexpat.so.%%SHLIB_MAJOR%%
@dirrm include/xml
diff --git a/textproc/expat2/Makefile b/textproc/expat2/Makefile
index 5aa0ad6c36bd..a01169965a1a 100644
--- a/textproc/expat2/Makefile
+++ b/textproc/expat2/Makefile
@@ -16,11 +16,17 @@ MAINTAINER= dirk@FreeBSD.org
USE_ZIP= yes
+SHLIB_MAJOR= 1
+
+PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}"
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xmlwf/xmlwf ${PREFIX}/bin
${MKDIR} ${PREFIX}/include/xml
${INSTALL_DATA} ${WRKSRC}/xmlparse/xmlparse.h ${PREFIX}/include/xml
${INSTALL_DATA} ${WRKSRC}/xmltok/xmltok.h ${PREFIX}/include/xml
${INSTALL_DATA} ${WRKSRC}/libexpat.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libexpat.so ${PREFIX}/lib/libexpat.so.${SHLIB_MAJOR}
+ ${LN} -s libexpat.so.${SHLIB_MAJOR} ${PREFIX}/lib/libexpat.so
.include <bsd.port.mk>
diff --git a/textproc/expat2/files/patch-aa b/textproc/expat2/files/patch-aa
index abcd4128d335..807621a158e7 100644
--- a/textproc/expat2/files/patch-aa
+++ b/textproc/expat2/files/patch-aa
@@ -1,6 +1,6 @@
--- Makefile.orig Mon Mar 8 08:20:38 1999
-+++ Makefile Thu Aug 26 14:49:24 1999
-@@ -1,10 +1,9 @@
++++ Makefile Wed Aug 9 04:48:01 2000
+@@ -1,30 +1,30 @@
-CC=gcc
# If you know what your system's byte order is, define XML_BYTE_ORDER:
# use -DXML_BYTE_ORDER=12 for little-endian byte order;
@@ -8,20 +8,39 @@
# -DXML_NS adds support for checking of lexical aspects of XML namespaces spec
# -DXML_MIN_SIZE makes a smaller but slower parser
-CFLAGS=-O2 -Ixmltok -Ixmlparse -DXML_NS
-+CFLAGS+=-Ixmltok -Ixmlparse -DXML_NS
++CFLAGS+=-Ixmltok -Ixmlparse -DXML_NS -fpic
# Use one of the next two lines; unixfilemap is better if it works.
FILEMAP_OBJ=xmlwf/unixfilemap.o
#FILEMAP_OBJ=xmlwf/readfilemap.o
-@@ -18,7 +17,7 @@
+ OBJS=xmltok/xmltok.o \
+ xmltok/xmlrole.o \
+- xmlwf/xmlwf.o \
+- xmlwf/xmlfile.o \
+- xmlwf/codepage.o \
+ xmlparse/xmlparse.o \
+ xmlparse/hashtable.o \
$(FILEMAP_OBJ)
++XOBJS=xmlwf/xmlwf.o \
++ xmlwf/xmlfile.o \
++ xmlwf/codepage.o
++
EXE=
-all: xmlwf/xmlwf$(EXE)
-+all: xmlwf/xmlwf$(EXE) libexpat.a
++all: xmlwf/xmlwf$(EXE) libexpat.a libexpat.so
+
+-xmlwf/xmlwf$(EXE): $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(OBJS)
++xmlwf/xmlwf$(EXE): $(XOBJS) libexpat.a
++ $(CC) $(CFLAGS) -o $@ $(XOBJS) -L. -lexpat
- xmlwf/xmlwf$(EXE): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(OBJS)
-@@ -34,6 +33,10 @@
+ clean:
+- rm -f $(OBJS) xmlwf/xmlwf$(EXE)
++ rm -f $(OBJS) $(XOBJS) xmlwf/xmlwf$(EXE)
+
+ xmltok/nametab.h: gennmtab/gennmtab$(EXE)
+ rm -f $@
+@@ -34,6 +34,13 @@
$(CC) $(CFLAGS) -o $@ gennmtab/gennmtab.c
xmltok/xmltok.o: xmltok/nametab.h
@@ -29,6 +48,9 @@
+libexpat.a: $(OBJS)
+ ar -rc $@ $(OBJS)
+ ranlib $@
++
++libexpat.so: $(OBJS)
++ $(CC) -shared -o $@ $(OBJS)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
diff --git a/textproc/expat2/pkg-plist b/textproc/expat2/pkg-plist
index e8658c72b36c..9aa0f13a1918 100644
--- a/textproc/expat2/pkg-plist
+++ b/textproc/expat2/pkg-plist
@@ -2,4 +2,6 @@ bin/xmlwf
include/xml/xmlparse.h
include/xml/xmltok.h
lib/libexpat.a
+lib/libexpat.so
+lib/libexpat.so.%%SHLIB_MAJOR%%
@dirrm include/xml