tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Best approach for a FreePascal Package




On 26/06/16 15:21, Edgar Fuß wrote:
> I would love to have FreePascal in pkgsrc!
> 
>> for FPC it requires an older FPC version for building the compiler.
> Would it be possible to use p2c to build a bootstrap compiler?
> 

You need to use bootstrap kits provided by FreePascal. I was making an
fpc package a wile ago that's very much a wip and Darwin, i386 only:

# $NetBSD$

DISTNAME=	fpc-3.0.0.source
PKGNAME=	fpc-3.0.0
CATEGORIES=	lang
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=freepascal/source/${PKGVERSION}/}

MAINTAINER=	youri%NetBSD.org@localhost
HOMEPAGE=	http://www.freepascal.org/
COMMENT=	Free Pascal is a 32, 64 and 16 bit professional Pascal compiler
LICENSE=	gnu-gpl-v2

DISTFILES=	${DEFAULT_DISTFILES}
EXTRACT_ONLY=	${DEFAULT_DISTFILES}

ONLY_FOR_PLATFORM=	Darwin-*-*

USE_TOOLS+=	gmake

WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
BOOTSTRAP_BIN=	${WRKSRC}/bootstrap/ppcuniversal

MAKE_ENV+=	PP=${BOOTSTRAP_BIN}

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Darwin"
MAKE_ENV+=	CPU_TARGET=i386
.endif

### belongs in a bootstrap.mk, ifdef OPSYS
BOOT_ARCHIVE=		universal-macosx-10.5-ppcuniversal.tar.bz2
DISTFILES:=		${DISTFILES} ${BOOT_ARCHIVE}
SITES.${BOOT_ARCHIVE}=
${MASTER_SITE_SOURCEFORGE:=freepascal/Bootstrap/2.6.4/}
###

pre-build:
	${RUN} ${MKDIR} ${WRKSRC}/bootstrap
	${RUN} cd ${WRKSRC} && \
		${EXTRACT_CMD_DEFAULT} ${DISTDIR}/${DIST_SUBDIR}/${BOOT_ARCHIVE} \
		&& ${RUN} mv ${WRKDIR}/ppcuniversal ${WRKSRC}/bootstrap/

do-install:
	${RUN} cd ${WRKSRC} && \
		${GMAKE} install PP=${BOOTSTRAP_BIN} \
		PREFIX=${DESTDIR}${PREFIX} CPU_TARGET=${CPU_TARGET}

.include "../../mk/bsd.pkg.mk"

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index