unbreak for i386, amd64 and powerpc.
OK sthen@, jasper@ bsd.port.arch.mk is now needed again for .if ${ARCH} == ...
This commit is contained in:
parent
41f1819031
commit
b6be895832
@ -1,15 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.24 2012/11/25 23:46:36 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.25 2012/11/27 22:28:53 chrisz Exp $
|
||||
|
||||
BROKEN = amd64: cilly fails at runtime (bad paths). !amd64: packaging broken.
|
||||
|
||||
# until tested on others, even though bytecode is produced
|
||||
ONLY_FOR_ARCHS = ${OCAML_NATIVE_ARCHS}
|
||||
# build system needs per-arch tweaks
|
||||
ONLY_FOR_ARCHS = amd64 i386 powerpc
|
||||
|
||||
COMMENT= framework for analysis and transformation of C
|
||||
CATEGORIES = devel lang
|
||||
|
||||
DISTNAME = cil-1.5.1
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
EXTRACT_SUFX = .tar.gz
|
||||
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=cil/}
|
||||
|
||||
@ -20,6 +18,7 @@ PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB= c curses m pthread
|
||||
|
||||
MODULES = lang/ocaml
|
||||
@ -36,7 +35,15 @@ CONFIGURE_ARGS = EXTRAFEATURES="${OURFILES:R}"
|
||||
P5SITE = libdata/perl5/site_perl
|
||||
P5INST = ${PREFIX}/${P5SITE}
|
||||
SUBST_VARS += P5SITE
|
||||
GCC = /usr/bin/gcc # cant use CC in case it's set to cilly
|
||||
GCC = /usr/bin/gcc# cant use CC in case it's set to cilly
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
.if ${ARCH} == powerpc
|
||||
PKG_ARGS += -Dtarget=ppc_OPENBSD
|
||||
.else
|
||||
# used for amd64 and i386
|
||||
PKG_ARGS += -Dtarget=x86_OPENBSD
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
cp ${FILESDIR}/*.ml ${WRKSRC}/src/ext
|
||||
@ -46,16 +53,11 @@ post-install:
|
||||
${INSTALL_SCRIPT} ${WRKBUILD}/bin/patcher ${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/libexec/cil
|
||||
${INSTALL_PROGRAM} \
|
||||
${WRKBUILD}/obj/x86_LINUX/machdep-ml*.exe \
|
||||
${WRKBUILD}/obj/*_OPENBSD/machdep-ml.exe \
|
||||
${PREFIX}/libexec/cil
|
||||
${INSTALL_DATA_DIR} ${P5INST}/CIL
|
||||
mv ${PREFIX}/lib/*.pm ${P5INST}/CIL/
|
||||
sed -e 's,@CILHOME@,${LOCALBASE},g' \
|
||||
-e 's,@CILLIBDIR@,${LOCALBASE}/${P5SITE}/CIL,g' \
|
||||
-e 's,@ARCHOS@,libexec/cil,g' \
|
||||
-e 's,@DEFAULT_CIL_MODE@,GNUCC,g' \
|
||||
-e 's,@CC@,${GCC},g' < \
|
||||
${WRKSRC}/bin/CilConfig.pm.in > ${P5INST}/CilConfig.pm
|
||||
|
||||
sed -e 's,@CILLIBDIR@,${LOCALBASE}/${P5SITE}/CIL,g' \
|
||||
${P5INST}/CIL/CilConfig.pm > ${P5INST}/CilConfig.pm
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-bin_cilly,v 1.2 2006/05/28 15:44:14 avsm Exp $
|
||||
--- bin/cilly.orig Sun May 21 05:14:15 2006
|
||||
+++ bin/cilly Sat May 27 19:23:05 2006
|
||||
@@ -61,7 +61,7 @@ use File::Basename;
|
||||
use strict;
|
||||
BEGIN {
|
||||
@CilCompiler::ISA = qw(Cilly);
|
||||
- $CilCompiler::base = "$::cilhome/obj/$::archos/cilly";
|
||||
+ $CilCompiler::base = "$::cilhome/$::archos/cilly";
|
||||
# Use the most recent version of cilly
|
||||
$CilCompiler::mtime_asm = int((stat("$CilCompiler::base.asm.exe"))[9]);
|
||||
$CilCompiler::mtime_byte = int((stat("$CilCompiler::base.byte.exe"))[9]);
|
@ -1,37 +1,20 @@
|
||||
$OpenBSD: patch-configure_in,v 1.8 2012/08/18 22:00:56 avsm Exp $
|
||||
--- configure.in.orig Sat Jul 14 12:20:43 2012
|
||||
+++ configure.in Thu Aug 9 18:54:58 2012
|
||||
@@ -83,7 +83,7 @@ binaryExists() {
|
||||
# this specifies the root of the source tree; it's just the
|
||||
# directory where ./configure runs, except on cygwin, which
|
||||
# overrides this below
|
||||
-CILHOME=`pwd`
|
||||
+CILHOME=${LOCALBASE}
|
||||
$OpenBSD: patch-configure_in,v 1.9 2012/11/27 22:28:53 chrisz Exp $
|
||||
--- configure.in.orig Tue Nov 27 09:16:41 2012
|
||||
+++ configure.in Tue Nov 27 09:16:59 2012
|
||||
@@ -370,9 +370,15 @@ case "$target" in
|
||||
;;
|
||||
|
||||
DEFAULT_COMPILER=_GNUCC
|
||||
DEFAULT_CIL_MODE=GNUCC
|
||||
@@ -125,8 +125,8 @@ ocamlDownloadInstructions="
|
||||
# required major/minor
|
||||
reqMaj=3
|
||||
reqMin=08
|
||||
-knownMaj=3
|
||||
-knownMin=12
|
||||
+knownMaj=4
|
||||
+knownMin=0
|
||||
AC_MSG_CHECKING(ocaml version is at least $reqMaj.$reqMin)
|
||||
if binaryExists ocamlc; then
|
||||
# what version?
|
||||
@@ -365,6 +365,13 @@ case "$target" in
|
||||
*86*openbsd*)
|
||||
- AC_MSG_RESULT(configuring for OpenBSD/x86)
|
||||
+ AC_MSG_RESULT(configuring for OpenBSD/x86)
|
||||
|
||||
*86*linux*)
|
||||
AC_MSG_RESULT(configuring for linux/x86)
|
||||
+
|
||||
+ ARCHOS=x86_LINUX
|
||||
ARCHOS=x86_OPENBSD
|
||||
+ ;;
|
||||
+
|
||||
+ # openbsd
|
||||
+ *openbsd*)
|
||||
+ AC_MSG_RESULT(configuring for OpenBSD)
|
||||
|
||||
ARCHOS=x86_LINUX
|
||||
+ *powerpc*openbsd*)
|
||||
+ AC_MSG_RESULT(configuring for OpenBSD/powerpc)
|
||||
+
|
||||
+ ARCHOS=ppc_OPENBSD
|
||||
;;
|
||||
|
||||
*i386*freebsd*|*amd64*freebsd*)
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.6 2012/08/18 22:00:56 avsm Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.7 2012/11/27 22:28:53 chrisz Exp $
|
||||
bin/cilly
|
||||
bin/patcher
|
||||
lib/ocaml/cil/
|
||||
@ -137,9 +137,7 @@ ${P5SITE}/CIL/TempFile.pm
|
||||
${P5SITE}/CilConfig.pm
|
||||
libexec/cil/
|
||||
@bin libexec/cil/machdep-ml.exe
|
||||
@bin libexec/cil/machdep-ml32.exe
|
||||
@bin libexec/cil/machdep-ml64.exe
|
||||
libexec/cil/obj/
|
||||
libexec/cil/obj/x86_LINUX/
|
||||
@bin libexec/cil/obj/x86_LINUX/cilly.asm.exe
|
||||
@bin libexec/cil/obj/x86_LINUX/cilly.byte.exe
|
||||
libexec/cil/obj/${target}/
|
||||
@bin libexec/cil/obj/${target}/cilly.asm.exe
|
||||
@bin libexec/cil/obj/${target}/cilly.byte.exe
|
||||
|
Loading…
x
Reference in New Issue
Block a user