basic port of gnu-prolog, adapted from submission:

- old tricks with $${DESTDIR} to make sure the compilation path is okay.
- patchlet to compile without gnu-make
- patchlet to not force any mcpu=   on i386.

To do: reenable extra features if they work.
This commit is contained in:
espie 2004-09-26 14:48:29 +00:00
parent 54b35a1c25
commit 7b8fcda725
8 changed files with 289 additions and 0 deletions

45
lang/gprolog/Makefile Normal file
View File

@ -0,0 +1,45 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/09/26 14:48:29 espie Exp $
COMMENT= Prolog compiler
DISTNAME= gprolog-1.2.16
CATEGORIES= lang
HOMEPAGE= http://gprolog.inria.fr/
MAINTAINER= Nuno Morgadinho <nmorgadinho@openbsd-pt.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_GNU:=gprolog/}
#USE_GMAKE= Yes
AUTOCONF_VERSION= 2.52
CONFIGURE_STYLE= autoconf dest no-autoheader
# --prefix overwrited by --with-install-dir
#CONFIGURE_ARGS+= --with-install-dir=${WRKINST}${LOCALBASE} --without-links-dir --disable-ebp --disable-fast-call --disable-piped-consult --disable-gui-console --disable-sockets --disable-fd-solver --with-examples-dir=${WRKINST}${LOCALBASE}/share/examples/gprolog --with-html-dir=${WRKINST}${LOCALBASE}/share/doc/gprolog/html --with-doc-dir=${WRKINST}${LOCALBASE}/share/doc/gprolog
CONFIGURE_ARGS+= --with-install-dir='$${DESTDIR}${PREFIX}' \
--without-links-dir \
--disable-ebp \
--disable-fast-call \
--disable-piped-consult \
--disable-gui-console \
--disable-sockets \
--disable-fd-solver \
--with-examples-dir='$${DESTDIR}${PREFIX}/share/examples/gprolog' \
--with-html-dir='$${DESTDIR}${PREFIX}/share/doc/gprolog/html' \
--with-doc-dir='$${DESTDIR}${PREFIX}/share/doc/gprolog'
WRKDIST= ${WRKDIR}/${DISTNAME}/src
INSTALL_TARGET= install-strip
.include <bsd.port.mk>

3
lang/gprolog/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (gprolog-1.2.16.tar.gz) = d7fe87106cd3e7e770375f04dd0d14c2
RMD160 (gprolog-1.2.16.tar.gz) = f15c6214f6ff905d6cbe15ee12cbff9a2dd939f9
SHA1 (gprolog-1.2.16.tar.gz) = 128071ff640be38782b943218762e09ef0287dc6

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-EnginePl_Makefile_in,v 1.1.1.1 2004/09/26 14:48:29 espie Exp $
--- EnginePl/Makefile.in.orig Sun Sep 26 16:45:00 2004
+++ EnginePl/Makefile.in Sun Sep 26 16:45:21 2004
@@ -55,7 +55,7 @@ cpp_headers@EXE_SUFFIX@: cpp_headers.c
$(TOP_LEVEL).h: headers.h cpp_headers
- D=`(cd ..;for i in *;do test -d $$i && X="$$X $(ROOT_DIR1)/src/$$i";done;echo $$X)`; ./cpp_headers headers.h $(TOP_LEVEL).h $$D
+ D=`(cd ..;set +e; for i in *;do test -d $$i && X="$$X $(ROOT_DIR1)/src/$$i";done;echo $$X)`; ./cpp_headers headers.h $(TOP_LEVEL).h $$D
# General core

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Ma2Asm_ix86_any_c,v 1.1.1.1 2004/09/26 14:48:29 espie Exp $
--- Ma2Asm/ix86_any.c.orig 2003-10-31 22:33:09.000000000 +0000
+++ Ma2Asm/ix86_any.c 2003-10-31 22:33:28.000000000 +0000
@@ -38,7 +38,7 @@
#define MAX_C_ARGS_IN_C_CODE 32
-#if (defined(M_ix86_cygwin) || defined(M_ix86_bsd)) && !defined(__FreeBSD__)
+#if (defined(M_ix86_cygwin) || defined(M_ix86_bsd)) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
#define UN "_"

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2004/09/26 14:48:29 espie Exp $
--- configure.in.orig Sun Sep 26 16:28:18 2004
+++ configure.in Sun Sep 26 16:28:44 2004
@@ -369,7 +369,7 @@ else
*sparc*solaris) CFLAGS_MACHINE='-msupersparc';;
i686*) CFLAGS_MACHINE='-mcpu=pentiumpro';;
i586*) CFLAGS_MACHINE='-mcpu=pentium';;
- i*86*) CFLAGS_MACHINE='-mcpu=i486';;
+ i*86*) CFLAGS_MACHINE='';;
powerpc*darwin*) CFLAGS_MACHINE='-mpowerpc -no-cpp-precomp';;
esac

25
lang/gprolog/pkg/DESCR Normal file
View File

@ -0,0 +1,25 @@
GNU Prolog is a free Prolog compiler with constraint solving over finite
domains developed by Daniel Diaz.
GNU Prolog accepts Prolog+constraint programs and produces native
binaries (like gcc does from a C source). The obtained executable is
then stand-alone. The size of this executable can be quite small since
GNU Prolog can avoid to link the code of most unused built-in
predicates. The performances of GNU Prolog are very encouraging
(comparable to commercial systems).
Beside the native-code compilation, GNU Prolog offers a classical
interactive interpreter (top-level) with a debugger.
The Prolog part conforms to the ISO standard for Prolog with many
extensions very useful in practice (global variables, OS interface,
sockets,...).
GNU Prolog also includes an efficient constraint solver over Finite
Domains (FD). This opens contraint logic pogramming to the user
combining the power of constraint programming to the declarativity of
logic programming.
WWW: http://gnu-prolog.inria.fr/
Nuno Morgadinho nmorgadinho@openbsd-pt.org

173
lang/gprolog/pkg/PLIST Normal file
View File

@ -0,0 +1,173 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/09/26 14:48:29 espie Exp $
COPYING
ChangeLog
NEWS
VERSION
bin/gplc
bin/gprolog
bin/hexgplc
bin/ma2asm
bin/pl2wam
bin/wam2ma
include/fd_to_c.h
include/gprolog.h
lib/all_pl_bips.o
lib/debugger.o
lib/libbips_pl.a
lib/libengine_pl.a
lib/liblinedit.a
lib/obj_begin.o
lib/obj_end.o
lib/top_level.o
share/doc/gprolog/
share/doc/gprolog/compil-scheme.pdf
share/doc/gprolog/debug-box.pdf
share/doc/gprolog/html/
share/doc/gprolog/html/compil-scheme.gif
share/doc/gprolog/html/contents_motif.gif
share/doc/gprolog/html/debug-box.gif
share/doc/gprolog/html/index.html
share/doc/gprolog/html/manual-idx.html
share/doc/gprolog/html/manual001.html
share/doc/gprolog/html/manual002.html
share/doc/gprolog/html/manual003.html
share/doc/gprolog/html/manual004.html
share/doc/gprolog/html/manual005.html
share/doc/gprolog/html/manual006.html
share/doc/gprolog/html/manual007.html
share/doc/gprolog/html/manual008.html
share/doc/gprolog/html/manual009.html
share/doc/gprolog/html/manual010.html
share/doc/gprolog/html/manual011.html
share/doc/gprolog/html/manual012.html
share/doc/gprolog/html/manual013.html
share/doc/gprolog/html/manual014.html
share/doc/gprolog/html/manual015.html
share/doc/gprolog/html/manual016.html
share/doc/gprolog/html/manual017.html
share/doc/gprolog/html/manual018.html
share/doc/gprolog/html/manual019.html
share/doc/gprolog/html/manual020.html
share/doc/gprolog/html/manual021.html
share/doc/gprolog/html/manual022.html
share/doc/gprolog/html/manual023.html
share/doc/gprolog/html/manual024.html
share/doc/gprolog/html/manual025.html
share/doc/gprolog/html/manual026.html
share/doc/gprolog/html/manual027.html
share/doc/gprolog/html/manual028.html
share/doc/gprolog/html/manual029.html
share/doc/gprolog/html/manual030.html
share/doc/gprolog/html/manual031.html
share/doc/gprolog/html/manual032.html
share/doc/gprolog/html/manual033.html
share/doc/gprolog/html/manual034.html
share/doc/gprolog/html/manual035.html
share/doc/gprolog/html/manual036.html
share/doc/gprolog/html/manual037.html
share/doc/gprolog/html/manual038.html
share/doc/gprolog/html/manual039.html
share/doc/gprolog/html/manual040.html
share/doc/gprolog/html/manual041.html
share/doc/gprolog/html/manual042.html
share/doc/gprolog/html/manual043.html
share/doc/gprolog/html/manual044.html
share/doc/gprolog/html/manual045.html
share/doc/gprolog/html/manual046.html
share/doc/gprolog/html/manual047.html
share/doc/gprolog/html/manual048.html
share/doc/gprolog/html/manual049.html
share/doc/gprolog/html/manual050.html
share/doc/gprolog/html/manual051.html
share/doc/gprolog/html/manual052.html
share/doc/gprolog/html/manual053.html
share/doc/gprolog/html/manual054.html
share/doc/gprolog/html/manual055.html
share/doc/gprolog/html/manual056.html
share/doc/gprolog/html/manual057.html
share/doc/gprolog/html/manual058.html
share/doc/gprolog/html/manual059.html
share/doc/gprolog/html/manual060.html
share/doc/gprolog/html/manual061.html
share/doc/gprolog/html/manual062.html
share/doc/gprolog/html/manual063.html
share/doc/gprolog/html/manual064.html
share/doc/gprolog/html/manual065.html
share/doc/gprolog/html/manual066.html
share/doc/gprolog/html/manual067.html
share/doc/gprolog/html/manual068.html
share/doc/gprolog/html/manual069.html
share/doc/gprolog/html/manual070.html
share/doc/gprolog/html/manual071.html
share/doc/gprolog/html/next_motif.gif
share/doc/gprolog/html/previous_motif.gif
share/doc/gprolog/manual.chm
share/doc/gprolog/manual.dvi
share/doc/gprolog/manual.pdf
share/doc/gprolog/manual.ps
share/doc/gprolog/pl-bips.dvi
share/examples/gprolog/
share/examples/gprolog/ExamplesC/
share/examples/gprolog/ExamplesC/Makefile
share/examples/gprolog/ExamplesC/README
share/examples/gprolog/ExamplesC/examp.pl
share/examples/gprolog/ExamplesC/examp_c.c
share/examples/gprolog/ExamplesC/new_main.pl
share/examples/gprolog/ExamplesC/new_main_c.c
share/examples/gprolog/ExamplesFD/
share/examples/gprolog/ExamplesFD/Makefile
share/examples/gprolog/ExamplesFD/alpha.pl
share/examples/gprolog/ExamplesFD/array.pl
share/examples/gprolog/ExamplesFD/bdiag.pl
share/examples/gprolog/ExamplesFD/bdonald.pl
share/examples/gprolog/ExamplesFD/bpigeon.pl
share/examples/gprolog/ExamplesFD/bqueens.pl
share/examples/gprolog/ExamplesFD/bramsey.pl
share/examples/gprolog/ExamplesFD/bridge.pl
share/examples/gprolog/ExamplesFD/bridge1.pl
share/examples/gprolog/ExamplesFD/bschur.pl
share/examples/gprolog/ExamplesFD/bsend.pl
share/examples/gprolog/ExamplesFD/cars.pl
share/examples/gprolog/ExamplesFD/crypta.pl
share/examples/gprolog/ExamplesFD/digit8.pl
share/examples/gprolog/ExamplesFD/donald.pl
share/examples/gprolog/ExamplesFD/eq10.pl
share/examples/gprolog/ExamplesFD/eq20.pl
share/examples/gprolog/ExamplesFD/five.pl
share/examples/gprolog/ExamplesFD/gardner.pl
share/examples/gprolog/ExamplesFD/magic.pl
share/examples/gprolog/ExamplesFD/magsq.pl
share/examples/gprolog/ExamplesFD/multipl.pl
share/examples/gprolog/ExamplesFD/partit.pl
share/examples/gprolog/ExamplesFD/qg5.pl
share/examples/gprolog/ExamplesFD/queens.pl
share/examples/gprolog/ExamplesFD/queens_fd.fd
share/examples/gprolog/ExamplesFD/send.pl
share/examples/gprolog/ExamplesFD/square.pl
share/examples/gprolog/ExamplesFD/srq.pl
share/examples/gprolog/ExamplesPl/
share/examples/gprolog/ExamplesPl/Makefile
share/examples/gprolog/ExamplesPl/PROGS
share/examples/gprolog/ExamplesPl/README
share/examples/gprolog/ExamplesPl/boyer.pl
share/examples/gprolog/ExamplesPl/browse.pl
share/examples/gprolog/ExamplesPl/cal.pl
share/examples/gprolog/ExamplesPl/chat_parser.pl
share/examples/gprolog/ExamplesPl/common.pl
share/examples/gprolog/ExamplesPl/crypt.pl
share/examples/gprolog/ExamplesPl/ham.pl
share/examples/gprolog/ExamplesPl/hook.pl
share/examples/gprolog/ExamplesPl/meta_qsort.pl
share/examples/gprolog/ExamplesPl/nand.pl
share/examples/gprolog/ExamplesPl/nrev.pl
share/examples/gprolog/ExamplesPl/poly_10.pl
share/examples/gprolog/ExamplesPl/qsort.pl
share/examples/gprolog/ExamplesPl/queens.pl
share/examples/gprolog/ExamplesPl/queensn.pl
share/examples/gprolog/ExamplesPl/query.pl
share/examples/gprolog/ExamplesPl/reducer.pl
share/examples/gprolog/ExamplesPl/sdda.pl
share/examples/gprolog/ExamplesPl/sendmore.pl
share/examples/gprolog/ExamplesPl/tak.pl
share/examples/gprolog/ExamplesPl/tak_gvar.pl
share/examples/gprolog/ExamplesPl/zebra.pl

View File

@ -0,0 +1,7 @@
$OpenBSD: SECURITY,v 1.1.1.1 2004/09/26 14:48:29 espie Exp $
${WRKDIR}EnginePl/machine1.c
call to mktemp could be insecure.
Use of possible unsafe calls of strcat, strcpy, strcmp and
sprintf in multiple files.