pkgsrc-WIP-changes archive

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

Add mxml4 version 4.0.3 to pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By:	nros
Date:		Sat Jan 4 20:41:28 2025 +0100
Changeset:	0034d1a5db00b213578735ea495a06d138a48ecf

Modified Files:
	Makefile
Added Files:
	mxml4/DESCR
	mxml4/Makefile
	mxml4/PLIST
	mxml4/buildlink3.mk
	mxml4/distinfo
	mxml4/options.mk
	mxml4/patches/patch-Makefile.in
	mxml4/patches/patch-configure

Log Message:
Add mxml4 version 4.0.3 to pkgsrc-wip

Mini-XML 4 is a small XML parsing library that you can use to
read XML and XML-like data files in your application without
requiring large non-standard libraries.
Older version of this library is in textproc/mxml .
Version 4 is source code incompatible with earlier versions
of mxml.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0034d1a5db00b213578735ea495a06d138a48ecf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                        |   1 +
 mxml4/DESCR                     |   4 ++
 mxml4/Makefile                  |  29 ++++++++++
 mxml4/PLIST                     |  12 ++++
 mxml4/buildlink3.mk             |  12 ++++
 mxml4/distinfo                  |   7 +++
 mxml4/options.mk                |   9 +++
 mxml4/patches/patch-Makefile.in | 118 ++++++++++++++++++++++++++++++++++++++++
 mxml4/patches/patch-configure   |  35 ++++++++++++
 9 files changed, 227 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 8ceaef5d2c..a7ea54e886 100644
--- a/Makefile
+++ b/Makefile
@@ -2462,6 +2462,7 @@ SUBDIR+=	muttprint
 SUBDIR+=	muttvcquery
 SUBDIR+=	mvsis
 SUBDIR+=	mxallowd
+SUBDIR+=	mxml4
 SUBDIR+=	myfitter
 SUBDIR+=	mysql++
 SUBDIR+=	mysql-docs
diff --git a/mxml4/DESCR b/mxml4/DESCR
new file mode 100644
index 0000000000..781d746a85
--- /dev/null
+++ b/mxml4/DESCR
@@ -0,0 +1,4 @@
+Mini-XML 4 is a small XML parsing library that you can use to
+read XML and XML-like data files in your application without
+requiring large non-standard libraries.
+Older version of this library is in textproc/mxml .
diff --git a/mxml4/Makefile b/mxml4/Makefile
new file mode 100644
index 0000000000..b38c562b0e
--- /dev/null
+++ b/mxml4/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD$
+
+DISTNAME=	mxml-4.0.3
+PKGNAME=	${DISTNAME:S/mxml/mxml4/}
+CATEGORIES=	textproc
+MASTER_SITES=	${MASTER_SITE_GITHUB:=michaelrsweet/}
+GITHUB_PROJECT=	mxml
+GITHUB_RELEASE=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://www.minixml.org/
+COMMENT=	Small XML parsing library
+LICENSE=	apache-2.0
+
+GNU_CONFIGURE=		yes
+USE_TOOLS+=		pkg-config
+USE_LANGUAGES=		c c++
+USE_CC_FEATURES=	c99
+USE_LIBTOOL=		yes
+
+CONFIGURE_ARGS+=	--with-sanitizer=no
+
+PKGCONFIG_OVERRIDE+=		mxml4.pc
+PKGCONFIG_OVERRIDE_STAGE=	post-configure
+
+.include "options.mk"
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mxml4/PLIST b/mxml4/PLIST
new file mode 100644
index 0000000000..d2edadf985
--- /dev/null
+++ b/mxml4/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD$
+include/libmxml4/mxml.h
+lib/libmxml4.la
+lib/pkgconfig/mxml4.pc
+man/man3/mxml4.3
+share/doc/mxml4/CHANGES
+share/doc/mxml4/LICENSE
+share/doc/mxml4/NOTICE
+share/doc/mxml4/README
+share/doc/mxml4/mxml-cover.png
+share/doc/mxml4/mxml.epub
+share/doc/mxml4/mxml.html
diff --git a/mxml4/buildlink3.mk b/mxml4/buildlink3.mk
new file mode 100644
index 0000000000..6345ce1247
--- /dev/null
+++ b/mxml4/buildlink3.mk
@@ -0,0 +1,12 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	mxml4
+
+.if !defined(MXML4_BUILDLINK3_MK)
+MXML4_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.mxml4+=	mxml4>=4.0.3
+BUILDLINK_PKGSRCDIR.mxml4?=	../../wip/mxml4
+.endif	# MXML4_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-mxml4
diff --git a/mxml4/distinfo b/mxml4/distinfo
new file mode 100644
index 0000000000..c97fa26153
--- /dev/null
+++ b/mxml4/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.9 2024/11/14 12:10:03 nros Exp $
+
+BLAKE2s (mxml-4.0.3.tar.gz) = 85816ed021468e15307c192ba890a030cc40e3b7a3afaaa97ed34957e4bb21db
+SHA512 (mxml-4.0.3.tar.gz) = 4e03e935c85addb6ce7183a80eb69e309058b51ff058ddc0cf44d16e3b17b455c0dfedd199d5a28292e805a61ec0d0fb698ee88397e53f7ec5d8b54db33f4300
+Size (mxml-4.0.3.tar.gz) = 1576803 bytes
+SHA1 (patch-Makefile.in) = 9b4eb417c4377b084ebe92c1b3a550f3240b401a
+SHA1 (patch-configure) = 616f1d644fa6c92f8dfb4ae97dce79ccaaf5c9e5
diff --git a/mxml4/options.mk b/mxml4/options.mk
new file mode 100644
index 0000000000..10492ff651
--- /dev/null
+++ b/mxml4/options.mk
@@ -0,0 +1,9 @@
+# $NetBSD: options.mk,v 1.2 2019/11/04 21:43:39 rillig Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.mxml4
+PKG_SUPPORTED_OPTIONS=	debug
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+=	--enable-debug=yes
+.endif
diff --git a/mxml4/patches/patch-Makefile.in b/mxml4/patches/patch-Makefile.in
new file mode 100644
index 0000000000..2b7f7f985d
--- /dev/null
+++ b/mxml4/patches/patch-Makefile.in
@@ -0,0 +1,118 @@
+$NetBSD$
+
+* Libtoolize build
+
+--- Makefile.in.orig	2024-04-21 21:10:21.000000000 +0000
++++ Makefile.in
+@@ -43,10 +43,10 @@ SHELL		=	/bin/sh
+ # Installation programs...
+ #
+ 
+-INSTALL_BIN	=	$(INSTALL) -c -m 755
++INSTALL_BIN	=	$(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) 
+ INSTALL_DATA	=	$(INSTALL) -c -m 444
+ INSTALL_DIR	=	$(INSTALL) -d -m 755
+-INSTALL_LIB	=	$(INSTALL) -c -m 755
++INSTALL_LIB	=	$(LIBTOOL) --mode=install $(BSD_INSTALL_LIB)
+ INSTALL_MAN	=	$(INSTALL) -c -m 444
+ 
+ 
+@@ -54,7 +54,7 @@ INSTALL_MAN	=	$(INSTALL) -c -m 444
+ # Libraries...
+ #
+ 
+-LIBMXML		=	@LIBMXML@
++LIBMXML		=	libmxml4.la
+ LIBMXML_BASE	=	@LIBMXML_BASE@
+ LIBMXML_STATIC	=	@LIBMXML_STATIC@
+ MXML_MAN	=	@MXML_MAN@
+@@ -140,10 +140,10 @@ BUILDROOT	=	$(DSTROOT)$(DESTDIR)
+ #
+ 
+ .SILENT:
+-.SUFFIXES:	.c .man .o
+-.c.o:
++.SUFFIXES:	.c .man .lo
++.c.lo:
+ 	echo Compiling $<
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
+ 
+ 
+ #
+@@ -206,7 +206,7 @@ distclean:	clean
+ 
+ .NOTPARALLEL: install install-$(LIBMXML) $(INSTALL_STATIC)
+ 
+-install:	$(TARGETS) install-$(LIBMXML) $(INSTALL_STATIC)
++install:	$(TARGETS) install-$(LIBMXML) 
+ 	echo Installing documentation in $(BUILDROOT)$(docdir)...
+ 	$(INSTALL_DIR) $(BUILDROOT)$(docdir)
+ 	for file in $(DOCFILES); do \
+@@ -222,11 +222,10 @@ install:	$(TARGETS) install-$(LIBMXML) $
+ 	$(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3
+ 	$(INSTALL_MAN) doc/mxml.3 $(BUILDROOT)$(mandir)/man3/$(MXML_MAN)
+ 
+-install-libmxml.a:	libmxml.a
+-	echo Installing libmxml.a to $(BUILDROOT)$(libdir)...
++install-libmxml.la:	libmxml.la
++	echo Installing libmxml.la to $(BUILDROOT)$(libdir)...
+ 	$(INSTALL_DIR) $(BUILDROOT)$(libdir)
+-	$(INSTALL_LIB) libmxml.a $(BUILDROOT)$(libdir)
+-	$(RANLIB) $(BUILDROOT)$(libdir)/libmxml.a
++	$(INSTALL_LIB) libmxml.la $(BUILDROOT)$(libdir)
+ 
+ install-libmxml.so.2:	libmxml.so.2
+ 	echo Installing libmxml.so to $(BUILDROOT)$(libdir)...
+@@ -243,11 +242,10 @@ install-libmxml.2.dylib: libmxml.2.dylib
+ 	$(RM) $(BUILDROOT)$(libdir)/libmxml.dylib
+ 	$(LN) libmxml.2.dylib $(BUILDROOT)$(libdir)/libmxml.dylib
+ 
+-install-libmxml4.a:	libmxml4.a
++install-libmxml4.la:	libmxml4.la
+ 	echo Installing libmxml4.a to $(BUILDROOT)$(libdir)...
+ 	$(INSTALL_DIR) $(BUILDROOT)$(libdir)
+-	$(INSTALL_LIB) libmxml4.a $(BUILDROOT)$(libdir)
+-	$(RANLIB) $(BUILDROOT)$(libdir)/libmxml4.a
++	$(INSTALL_LIB) libmxml4.la $(BUILDROOT)$(libdir)
+ 
+ install-libmxml4.so.2:	libmxml4.so.2
+ 	echo Installing libmxml4.so to $(BUILDROOT)$(libdir)...
+@@ -354,15 +352,13 @@ sloc:
+ 
+ 
+ #
+-# libmxml.a
++# libmxml.la
+ #
+ 
+-libmxml.a libmxml4.a:	$(LIBOBJS)
++libmxml.la libmxml4.la:	$(LIBOBJS:.o=.lo)
+ 	echo Creating $@...
+-	$(RM) $@
+-	$(AR) $(ARFLAGS) $@ $(LIBOBJS)
+-	$(RANLIB) $@
+-
++	${LIBTOOL} --mode=link ${CC} ${LDFLAGS} ${LIBOBJS:.o=.lo} \
++		-o ${LIBMXML} -rpath ${PREFIX}/lib -version-info 2:0
+ $(LIBOBJS):	mxml.h mxml-private.h
+ 
+ 
+@@ -405,13 +401,13 @@ libmxml.2.dylib libmxml4.2.dylib:	$(LIBO
+ # testmxml
+ #
+ 
+-testmxml:	$(LIBMXML_STATIC) testmxml.o
++testmxml:	$(LIBMXML) testmxml.o
+ 	echo Linking $@...
+-	$(CC) $(LDFLAGS) -o $@ testmxml.o $(LIBMXML_STATIC) $(LIBS)
++	$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ testmxml.o $(LIBMXML) $(LIBS)
+ 
+-testmxml-vg:	$(LIBOBJS) testmxml.o
++testmxml-vg:	$(LIBMXML) $(LIBOBJS:.o=.lo) testmxml.o
+ 	echo Linking $@...
+-	$(CC) $(LDFLAGS) -o $@ testmxml.o $(LIBOBJS) $(LIBS)
++	$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ testmxml.o $(LIBOBJS:.o=.lo) $(LIBS)
+ 
+ testmxml.o:	mxml.h
+ 
diff --git a/mxml4/patches/patch-configure b/mxml4/patches/patch-configure
new file mode 100644
index 0000000000..4f85ee3228
--- /dev/null
+++ b/mxml4/patches/patch-configure
@@ -0,0 +1,35 @@
+$NetBSD$
+
+* Let pkgsrc set optimize level
+* Don't add debug symbols if the user doesn't want it
+* Fix /usr/local as prefix in pkgsrc
+
+--- configure.orig	2024-04-21 21:10:21.000000000 +0000
++++ configure
+@@ -4429,7 +4429,7 @@ then :
+ else $as_nop
+ 
+     CSFLAGS="-o runtime"
+-    OPTIM="$OPTIM -g -Os"
++    OPTIM="$OPTIM"
+     OPTIONS=""
+ 
+ fi
+@@ -4458,7 +4458,7 @@ else $as_nop
+ 
+ 	# Otherwise use the Fortify enhancements to catch any unbounded
+ 	# string operations...
+-	CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=3"
++	CPPFLAGS="$CPPFLAGS"
+ 
+ fi
+ 
+@@ -4724,7 +4724,7 @@ else $as_nop
+ 
+ fi
+ PKGCONFIG_LIBS="$LINK_MXML"
+-if test "$realprefix" != "/usr" -a "$realprefix" != "/usr/local"
++if test "$realprefix" != "/usr"
+ then :
+ 
+     PKGCONFIG_LIBS="-L\${libdir} $PKGCONFIG_LIBS"


Home | Main Index | Thread Index | Old Index