Package-Name: opensp
Gentoo-Package: app-text/opensp
Homepage: http://openjade.sourceforge.net/
Source: sourceforge:///openjade/OpenSP-(\d+(.\d+)+\w*).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	mv OpenSP* opensp-"$(VERSION)"
Compile:
	$(MAKE) -f ../Makefile configure CONFIGURE_OPTS="--disable-doc-build"
	$(MAKE)
	$(MAKE) install
	rm -rf "$(PREFIX)"/doc
	mv -f "$(PREFIX)"/share/doc/OpenSP/* "$(PREFIX)"/
	rm -rf "$(PREFIX)"/share/doc
Install:
	$(MAKE) instbin BIN="onsgmls osgmlnorm ospam ospcat ospent osx"
	$(MAKE) instinc INC=OpenSP
	$(MAKE) instlib LIB=osp
	$(MAKE) addldso
	$(MAKE) instman SECTION=1 MAN="onsgmls osgmlnorm ospam ospcat ospent osx"
	rm -rf /usr/share/OpenSP
	ln -s "$(PREFIX)"/share/OpenSP /usr/share/
Clean:
	@set -e ; cd "$(PREFIX)"/lib ; \
	for lib in *.so.[0-9] ; do \
		reallib=`/bin/ls -l "$$lib" | sed 's/.* -> //'` ; \
		for file in $$lib.[0-9]*.[0-9]* ; do \
			if test "$$file" != "$$reallib" ; then \
				rm -fv "$$file" ; \
			fi ; \
		done ; \
	done
NoPatch: <<EOT
######## begin compile fix
--- include/UnivCharsetDesc.h.old	1999-11-04 17:36:06 +0900
+++ include/UnivCharsetDesc.h	2004-08-20 20:23:41 +0900
@@ -9,11 +9,11 @@
 
 #include <stddef.h>
 #include "types.h"
+#include "constant.h"
 #include "CharMap.h"
 #include "RangeMap.h"
 #include "Boolean.h"
 #include "ISet.h"
-#include "constant.h"
 
 #ifdef SP_NAMESPACE
 namespace SP_NAMESPACE {
######## end compile fix
EOT

/pkg/opensp/
/usr/bin/onsgmls
/usr/bin/osgmlnorm
/usr/bin/ospam
/usr/bin/ospcat
/usr/bin/ospent
/usr/bin/osx
/usr/include/OpenSP
/usr/lib/libosp.*
/usr/man/man1/onsgmls.1.gz
/usr/man/man1/osgmlnorm.1.gz
/usr/man/man1/ospam.1.gz
/usr/man/man1/ospcat.1.gz
/usr/man/man1/ospent.1.gz
/usr/man/man1/osx.1.gz
/usr/share/OpenSP
