aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/hs-hsql/Makefile46
-rw-r--r--databases/hs-hsql/distinfo4
-rw-r--r--databases/hs-hsql/files/patch-Makefile34
-rw-r--r--databases/hs-hsql/pkg-plist24
4 files changed, 75 insertions, 33 deletions
diff --git a/databases/hs-hsql/Makefile b/databases/hs-hsql/Makefile
index 1359005516cc..0beca21f9af7 100644
--- a/databases/hs-hsql/Makefile
+++ b/databases/hs-hsql/Makefile
@@ -6,18 +6,20 @@
#
PORTNAME= hsql
-PORTVERSION= 1.0
+PORTVERSION= 1.2
CATEGORIES= databases haskell
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= htoolkit
PKGNAMEPREFIX= hs-
+DISTNAME= HSQL-${PORTVERSION}
MAINTAINER= obraun@FreeBSD.org
COMMENT= Haskell access to SQL
-BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- psql:${PORTSDIR}/databases/postgresql7
-RUN_DEPENDS= ${BUILD_DEPENDS}
+BUILD_DEPENDS= psql:${PORTSDIR}/databases/postgresql7 \
+ ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS= psql:${PORTSDIR}/databases/postgresql7 \
+ ghc:${PORTSDIR}/lang/ghc
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
@@ -25,8 +27,8 @@ ALL_TARGET= all docs
.endif
WRKSRC= ${WRKDIR}/HSQL
-
USE_SIZE= yes
+USE_BZIP2= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}/lib --enable-postgres
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include/postgresql/server \
@@ -34,11 +36,43 @@ CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include/postgresql/server \
USE_GMAKE= yes
MAKE_ENV+= DOCSDIR=${DOCSDIR}
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/bin/hugs)
+WITH_HUGS= yes
+.endif
+
+.if defined(PACKAGE_BUILDING)
+WITH_HUGS= yes
+.endif
+
+.if defined(WITH_HUGS)
+BUILD_DEPENDS+= hugs:${PORTSDIR}/lang/hugs
+RUN_DEPENDS+= hugs:${PORTSDIR}/lang/hugs
+.endif
+
GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
PLIST_SUB+= GHC_VERSION="${GHC_VERSION}"
+.if defined(WITH_HUGS)
+PLIST_SUB+= HUGS=""
+.else
+PLIST_SUB+= HUGS="@comment "
+.endif
+
+pre-everything::
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} " HSQL will be installed for ghc."
+ @${ECHO_CMD} ""
+.if defined(WITH_HUGS)
+ @${ECHO_CMD} " HSQL will be installed for hugs."
+.else
+ @${ECHO_CMD} " Define WITH_HUGS to install HSQL for hugs."
+.endif
+ @${ECHO_CMD} ""
+
post-install:
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/hsql.pkg ${DATADIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/hs-hsql/distinfo b/databases/hs-hsql/distinfo
index 06d4cb1db912..e54d951b58a7 100644
--- a/databases/hs-hsql/distinfo
+++ b/databases/hs-hsql/distinfo
@@ -1,2 +1,2 @@
-MD5 (hsql-1.0.tar.gz) = 125c42f4553115b2b88e1004e7d1c522
-SIZE (hsql-1.0.tar.gz) = 61186
+MD5 (HSQL-1.2.tar.bz2) = e486b0d6711d153d11415c5ac2f9520e
+SIZE (HSQL-1.2.tar.bz2) = 60178
diff --git a/databases/hs-hsql/files/patch-Makefile b/databases/hs-hsql/files/patch-Makefile
index dedd21f14826..b93b7914e1f4 100644
--- a/databases/hs-hsql/files/patch-Makefile
+++ b/databases/hs-hsql/files/patch-Makefile
@@ -1,22 +1,22 @@
---- Makefile.orig Sun Sep 7 23:24:33 2003
-+++ Makefile Fri Jan 16 00:39:58 2004
-@@ -51,7 +51,7 @@
- mkdir -p doc
- $(HADDOCK) -h -o doc $(HS_PPS)
+--- Makefile.orig Mon Feb 2 22:42:07 2004
++++ Makefile Tue Feb 3 12:53:54 2004
+@@ -143,7 +143,7 @@
--install: libHSsql.a $(HI_SRC) docs
-+install: libHSsql.a $(HI_SRC)
- $(INSTALL) libHSsql.a $(prefix)/libHSsql.a
- $(INSTALL) -d $(prefix)/imports/Database
- for i in $(HI_SRC); do \
-@@ -61,8 +61,8 @@
- rm -f $(prefix)/HSsql.o
+ install: $(patsubst %, install-%, $(COMPILERS))
+
+-install-ghc: $(HSQLLib) $(HI_SRC) docs
++install-ghc: $(HSQLLib) $(HI_SRC)
+ $(INSTALL) $(HSQLLib) $(GHC_DIR)/libHSsql.a
+ $(INSTALL) -d $(GHC_DIR)/imports/Database
+ for i in $(patsubst $(BUILDDIR)/%,%,$(HI_SRC)); do \
+@@ -153,8 +153,8 @@
+ rm -f $(GHC_DIR)/HSsql.o
$(GHC_PKG) -u -g -i hsql.pkg
- if test -f doc/index.html; then \
-- $(INSTALL) -d $(prefix)/doc/html/hsql; \
-- $(INSTALL) -c doc/* $(prefix)/doc/html/hsql; \
+ if test -f $(DOCDIR)/index.html; then \
+- $(INSTALL) -d $(GHC_DIR)/doc/html/libraries/hsql; \
+- $(INSTALL) -c $(DOCDIR)/* $(GHC_DIR)/doc/html/libraries/hsql; \
+ $(INSTALL) -d ${DOCSDIR}; \
-+ $(INSTALL) -c doc/* ${DOCSDIR}; \
++ $(INSTALL) -c $(DOCDIR)/* ${DOCSDIR}; \
fi
- ODBC/HSQL.hs : ODBC/HSQLStructs.h
+ install-hugs: $(HS_SRC) $(SO_SRC)
diff --git a/databases/hs-hsql/pkg-plist b/databases/hs-hsql/pkg-plist
index e016057f7cc2..e6c31f818602 100644
--- a/databases/hs-hsql/pkg-plist
+++ b/databases/hs-hsql/pkg-plist
@@ -1,7 +1,13 @@
-lib/HSsql.o
-lib/imports/Database/PostgreSQL/HSQL.hi
-lib/libHSsql.a
-%%PORTDOCS%%%%DOCSDIR%%/Database.PostgreSQL.HSQL.html
+lib/ghc-%%GHC_VERSION%%/HSsql.o
+lib/ghc-%%GHC_VERSION%%/imports/Database/HSQL/PostgreSQL.hi
+lib/ghc-%%GHC_VERSION%%/imports/Database/HSQL/Types.hi
+lib/ghc-%%GHC_VERSION%%/imports/Database/HSQL.hi
+lib/ghc-%%GHC_VERSION%%/libHSsql.a
+%%HUGS%%lib/hugs/libraries/Database/HSQL/PostgreSQL.hs
+%%HUGS%%lib/hugs/libraries/Database/HSQL/PostgreSQL.so
+%%HUGS%%lib/hugs/libraries/Database/HSQL/Types.hs
+%%HUGS%%lib/hugs/libraries/Database/HSQL.hs
+%%HUGS%%lib/hugs/libraries/Database/HSQL.so
%%PORTDOCS%%%%DOCSDIR%%/doc-index-B.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-C.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-D.html
@@ -11,7 +17,6 @@ lib/libHSsql.a
%%PORTDOCS%%%%DOCSDIR%%/doc-index-H.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-I.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-L.html
-%%PORTDOCS%%%%DOCSDIR%%/doc-index-M.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-O.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-P.html
%%PORTDOCS%%%%DOCSDIR%%/doc-index-Q.html
@@ -21,11 +26,14 @@ lib/libHSsql.a
%%PORTDOCS%%%%DOCSDIR%%/haddock.css
%%PORTDOCS%%%%DOCSDIR%%/haskell_icon.gif
%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/Database.HSQL.PostgreSQL.html
+%%PORTDOCS%%%%DOCSDIR%%/Database.HSQL.html
%%DATADIR%%/hsql.pkg
+@dirrm lib/ghc-%%GHC_VERSION%%/imports/Database/HSQL
+@dirrm lib/ghc-%%GHC_VERSION%%/imports/Database
+%%HUGS%%@dirrm lib/hugs/libraries/Database/HSQL
+%%HUGS%%@dirrm lib/hugs/libraries/Database
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm lib/imports/Database/PostgreSQL
-@dirrm lib/imports/Database
-@dirrm lib/imports
@dirrm %%DATADIR%%
@exec %D/bin/ghc-pkg -u -g -i %D/share/hsql/hsql.pkg
@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old