aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-08-15 04:57:30 +0800
committermarino <marino@FreeBSD.org>2014-08-15 04:57:30 +0800
commit811cd0be4c0918a4d82206daad089fb050d7cecb (patch)
tree36c26064e4c634ec135e0772574293fce6d056d6 /textproc
parentffe8f867380304a6b93d9201062bbe147b76c625 (diff)
downloadfreebsd-ports-gnome-811cd0be4c0918a4d82206daad089fb050d7cecb.tar.gz
freebsd-ports-gnome-811cd0be4c0918a4d82206daad089fb050d7cecb.tar.zst
freebsd-ports-gnome-811cd0be4c0918a4d82206daad089fb050d7cecb.zip
Stage textproc/domc and unbreak on sparc64, amd64
PR: 181736 Submitted by: Jan Beich
Diffstat (limited to 'textproc')
-rw-r--r--textproc/domc/Makefile29
-rw-r--r--textproc/domc/files/patch-Makefile42
-rw-r--r--textproc/domc/files/patch-src_defines.h11
-rw-r--r--textproc/domc/files/patch-src_domc.h6
-rw-r--r--textproc/domc/pkg-plist11
5 files changed, 46 insertions, 53 deletions
diff --git a/textproc/domc/Makefile b/textproc/domc/Makefile
index f3a33388ec54..5874a57ecdca 100644
--- a/textproc/domc/Makefile
+++ b/textproc/domc/Makefile
@@ -3,36 +3,23 @@
PORTNAME= domc
PORTVERSION= 0.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= http://www.ioplex.com/~miallen/domc/dl/
MAINTAINER= ports@FreeBSD.org
COMMENT= Lightweight implementation of the DOM in ANSI C
+LICENSE= MIT
+
LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \
libmba.so:${PORTSDIR}/devel/libmba
USES= gmake
-MAKE_ENV= SHLIB_MAJOR="${SHLIB_MAJOR}" INSTDIR=${PREFIX}
+MAKE_ENV= prefix="${LOCALBASE}" INSTDIR="${STAGEDIR}${PREFIX}"
+MAKE_ARGS= CC="${CC}" RPM_OPT_FLAGS="${CFLAGS}" \
+ MAJVERSION=${PORTVERSION:R:R}
+CFLAGS+= -D__USE_XOPEN=__XSI_VISIBLE
USE_LDCONFIG= yes
-CFLAGS+= -I${LOCALBASE}/include -fPIC
-LDFLAGS+= -L${LOCALBASE}/lib
-SHLIB_MAJOR= 0
-
-PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}"
-
-MAN3= DOM_CharacterData.3m DOM_Document.3m DOM_Element.3m \
- DOM_Implementation.3m DOM_NamedNodeMap.3m DOM_Node.3m \
- DOM_NodeList.3m DOM_Text.3m
-MANCOMPRESSED= yes
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "sparc64"
-BROKEN= Does not compile on sparc64-8: duplicate definition of strlen
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/textproc/domc/files/patch-Makefile b/textproc/domc/files/patch-Makefile
index 0abe144e9c04..2b10d9996b58 100644
--- a/textproc/domc/files/patch-Makefile
+++ b/textproc/domc/files/patch-Makefile
@@ -1,29 +1,17 @@
--- Makefile.orig Fri Sep 10 00:31:42 2004
+++ Makefile Mon Mar 7 14:48:36 2005
-@@ -1,17 +1,15 @@
+@@ -1,4 +1,4 @@
-prefix = /usr/local
-+prefix = ${PREFIX}
++prefix ?= /usr/local
includedir = $(prefix)/include
libdir = $(prefix)/lib
mandir = $(prefix)/man
--CC = gcc
- LIBNAME = domc
- MAJVERSION = 0.8
- MINVERSION = 0.8.0
- ARNAME = lib$(LIBNAME).a
--SONAME = lib$(LIBNAME).so.$(MINVERSION)
--SOVERSION = lib$(LIBNAME).so.$(MAJVERSION)
-+SONAME = lib$(LIBNAME).so.${SHLIB_MAJOR}
-+SOVERSION = lib$(LIBNAME).so.${SHLIB_MAJOR}
- DISTRO = $(LIBNAME)-$(MINVERSION)
--RPM_OPT_FLAGS = -O2
--CFLAGS = -Wall -W -g -DMSGNO $(RPM_OPT_FLAGS) -I$(includedir) -L$(libdir)
-+CFLAGS += -Wall -W -g -DMSGNO -I$(includedir) -L$(libdir)
- #CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS) -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wtraditional -Wconversion -Waggregate-return -Wno-parentheses
+@@ -16,10 +16,10 @@ CFLAGS = -Wall -W -g -DMSGNO $(RPM_O
OBJS = src/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o src/mbs.o
MAN = DOM_CharacterData.3m.gz DOM_Document.3m.gz DOM_Element.3m.gz DOM_Implementation.3m.gz DOM_NamedNodeMap.3m.gz DOM_Node.3m.gz DOM_NodeList.3m.gz DOM_Text.3m.gz
-@@ -19,12 +17,11 @@
- all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h
+
+-all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h
++all: $(SONAME) src/defines.h
$(SONAME): $(OBJS)
- $(CC) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME)
@@ -31,24 +19,24 @@
.c.a:
$(CC) $(CFLAGS) -c -o $*.o $<
- ar rv $@ $*.o
-- rm $*.o
-
+@@ -29,16 +29,15 @@ $(SONAME): $(OBJS)
.c.o:
$(CC) $(CFLAGS) -fpic -c -o $*.o $<
-@@ -33,12 +30,10 @@
+
++install: prefix=$(INSTDIR)
+ install: $(SONAME)
install -d $(libdir)
install -d $(includedir)
install -d $(mandir)/man3
- install -m 644 $(ARNAME) $(libdir)
- install -m 755 $(SONAME) $(libdir)
-- cd $(libdir) && ln -sf $(SONAME) $(SOVERSION) && ln -sf $(SONAME) lib$(LIBNAME).so
++ ${BSD_INSTALL_LIB} $(SONAME) $(libdir)
+ cd $(libdir) && ln -sf $(SONAME) $(SOVERSION) && ln -sf $(SONAME) lib$(LIBNAME).so
- install -m 444 src/domc.h $(includedir)
-+ ${BSD_INSTALL_DATA} $(SONAME) $(INSTDIR)/lib
-+ cd $(INSTDIR)/lib ; ln -sf $(SONAME) $(INSTDIR)/lib/lib$(LIBNAME).so
-+ ${BSD_INSTALL_DATA} src/domc.h $(INSTDIR)/include
- -install -m 444 docs/man/*.3m.gz $(mandir)/man3
+- -install -m 444 docs/man/*.3m.gz $(mandir)/man3
- -/sbin/ldconfig $(libdir)
++ ${BSD_INSTALL_DATA} src/domc.h $(includedir)
++ ${BSD_INSTALL_DATA} docs/man/*.3m.gz $(mandir)/man3
zip:
cd .. && zip -lr $(DISTRO)/.$(DISTRO).zip $(DISTRO) -x $(DISTRO)/.* $(DISTRO)/docs/man/* $(DISTRO)/tests/utf8* $(DISTRO)/domc.lib $(DISTRO)/domc.dll $(DISTRO)/domc_s.lib
diff --git a/textproc/domc/files/patch-src_defines.h b/textproc/domc/files/patch-src_defines.h
new file mode 100644
index 000000000000..223a6be82cb3
--- /dev/null
+++ b/textproc/domc/files/patch-src_defines.h
@@ -0,0 +1,11 @@
+--- src/defines.h~
++++ src/defines.h
+@@ -1,7 +1,7 @@
+ #ifndef DEFINES_H
+ #define DEFINES_H
+
+-#if defined(__sparc__)
++#if 0 //defined(__sparc__)
+
+ #define NL "\n"
+ #define HAVE_ENCDEC 0
diff --git a/textproc/domc/files/patch-src_domc.h b/textproc/domc/files/patch-src_domc.h
index 83e868594765..d4e2ddcb22d3 100644
--- a/textproc/domc/files/patch-src_domc.h
+++ b/textproc/domc/files/patch-src_domc.h
@@ -1,13 +1,11 @@
--- src/domc.h.orig Thu Sep 9 23:52:10 2004
+++ src/domc.h Sun Apr 10 22:14:52 2005
-@@ -33,7 +33,9 @@
+@@ -33,7 +33,7 @@
#include <errno.h>
#include <time.h>
-#if defined(__sparc__)
-+#if defined(__FreeBSD__)
-+ #include <inttypes.h>
-+#elif defined(__sparc__)
++#if 0 //defined(__sparc__)
#include <sys/inttypes.h>
#elif defined(_WIN32)
typedef unsigned __int64 uint64_t;
diff --git a/textproc/domc/pkg-plist b/textproc/domc/pkg-plist
index 8be6dcf9b779..4a337e01d16a 100644
--- a/textproc/domc/pkg-plist
+++ b/textproc/domc/pkg-plist
@@ -1,3 +1,12 @@
include/domc.h
lib/libdomc.so
-lib/libdomc.so.%%SHLIB_MAJOR%%
+lib/libdomc.so.0
+lib/libdomc.so.0.8.0
+man/man3/DOM_CharacterData.3m.gz
+man/man3/DOM_Document.3m.gz
+man/man3/DOM_Element.3m.gz
+man/man3/DOM_Implementation.3m.gz
+man/man3/DOM_NamedNodeMap.3m.gz
+man/man3/DOM_Node.3m.gz
+man/man3/DOM_NodeList.3m.gz
+man/man3/DOM_Text.3m.gz