mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
512b1fa46d
This hack in the GCC 4.2.4 code base #define U (const unsigned char *) /* Intended use: U"string" */ clashes with the more recent syntax for string literals of type char32_t[]. Pick an unobtrusive fix from GCC 4.4 and replace U with UC.
93 lines
2.2 KiB
Makefile
93 lines
2.2 KiB
Makefile
# Should work on all other archs.
|
|
NOT_FOR_ARCHS = aarch64 m88k mips64 powerpc64 riscv64
|
|
|
|
COMMENT = GNU Pascal compiler
|
|
DISTNAME = gpc-20070904
|
|
REVISION = 20
|
|
CATEGORIES = lang
|
|
|
|
HOMEPAGE = https://www.gnu-pascal.de/gpc/h-index.html
|
|
|
|
# GPLv3+
|
|
PERMIT_PACKAGE = Yes
|
|
|
|
WANTLIB += c gmp mpfr
|
|
|
|
SITES = https://mirrors.nycbug.org/pub/distfiles/
|
|
|
|
BUILD_DEPENDS = devel/bison \
|
|
textproc/gsed \
|
|
${MODGNU_AUTOCONF_DEPENDS}
|
|
|
|
LIB_DEPENDS = devel/gmp \
|
|
devel/mpfr
|
|
|
|
# --disable-shared because upstream claims that the shared
|
|
# libgpc doesn't work.
|
|
CONFIGURE_STYLE = gnu
|
|
CONFIGURE_ARGS = \
|
|
--build=${CONFIG} \
|
|
--host=${CONFIG} \
|
|
--verbose \
|
|
--disable-nls \
|
|
--disable-checking \
|
|
--with-system-zlib \
|
|
--disable-libmudflap \
|
|
--disable-libgomp \
|
|
--disable-libssp \
|
|
--disable-tls \
|
|
--disable-shared \
|
|
--with-gnu-ld \
|
|
--with-gnu-as \
|
|
--enable-threads=posix \
|
|
--enable-wchar_t \
|
|
--with-gmp="${LOCALBASE}" \
|
|
--disable-libstdcxx-pch \
|
|
--disable-bootstrap \
|
|
--enable-languages=pascal
|
|
|
|
SEPARATE_BUILD = Yes
|
|
|
|
USE_GMAKE = Yes
|
|
MAKE_ENV = AUTOCONF_VERSION="${AUTOCONF_VERSION}"
|
|
|
|
# We don't want to test gcc-4.2.4...
|
|
# And the gpc tests are subtly broken on 4.y.z
|
|
NO_TEST = Yes
|
|
|
|
AUTOCONF_VERSION = 2.59
|
|
|
|
.if ${MACHINE_ARCH} == "powerpc"
|
|
PKG_ARGS += -DPPC=1
|
|
.else
|
|
PKG_ARGS += -DPPC=0
|
|
.endif
|
|
|
|
# do not include OSREV
|
|
CONFIG = ${MACHINE_ARCH}-unknown-openbsd
|
|
SUBST_VARS += CONFIG
|
|
|
|
# We don't really want gcc-4.2.4 laying around...
|
|
# gpc-run.1 is an empty file?
|
|
# The doc folder is empty?
|
|
# The info files are broken?
|
|
post-install:
|
|
@rm -f ${PREFIX}/bin/*gcc*
|
|
@rm -f ${PREFIX}/bin/{cpp,gcc,gccbug,gcov}
|
|
@rm -rf ${PREFIX}/lib/fpic
|
|
@rm -f ${PREFIX}/lib/libiberty.a
|
|
@rm -rf ${PREFIX}/lib/${CONFIG}/4.2.4/{include,install-tools}
|
|
@rm -rf ${PREFIX}/lib/gcc/${CONFIG}/4.2.4/{fpic,install-tools}
|
|
@cp ${PREFIX}/lib/gcc/${CONFIG}/4.2.4/include/gpc-in-c.h \
|
|
${PREFIX}/lib/gcc/${CONFIG}/4.2.4
|
|
@rm -rf ${PREFIX}/lib/gcc/${CONFIG}/4.2.4/include/*
|
|
@mv ${PREFIX}/lib/gcc/${CONFIG}/4.2.4/gpc-in-c.h \
|
|
${PREFIX}/lib/gcc/${CONFIG}/4.2.4/include
|
|
@rm -rf ${PREFIX}/libexec/gcc/${CONFIG}/4.2.4/{cc1,fpic,install-tools}
|
|
@rm -f ${PREFIX}/man/man1/{cpp,gcc,gcov,gpc-run}.1
|
|
@rm -rf ${PREFIX}/man/man7
|
|
@rm -rf ${PREFIX}/info/*
|
|
@rm -rf ${PREFIX}/doc
|
|
|
|
.include <bsd.port.mk>
|