Tuesday, May 21, 2019

Re: Update lang/pcc and add devel/pcc-libs

On 5/21/19 8:50 AM, Leonid Bobrov wrote:
> Hi!
>
> I don't know where to find a changelog, so I guess only running cvs diff
> will help (and I don't know how to receive commit history not per file).
>
> Also Daniel mentioned that it's better to use snapshot because there are
> lots of fixes and 1.1.0 has a build problem. But meanwhile I send the
> latest release here.
>
> Also many programs need to be built with -fPIC flag, but they work.

I work a lot with Anders to keep pcc working on OpenBSD. Current
checkouts of the pcc and pcc-libs CVS trees compile out of the box on
OpenBSD.
A couple things:
1. New ports are traditionally sent as tarballs, not a collection of diffs.
2. pcc-libs should really live under the lang/pcc port. Maybe it's time
to move lang/pcc to lang/pcc/pcc and add lang/pcc/pcc-libs. See
lang/flang for an example.
3. You really need to use something more recent than pcc-1.1.0. That's
already 5 years old and a lot has changed since then.
4. Your patches to pcc mean that the whole pcc-libs port is useless,
since you told pcc never to use -lpcc.

If there is interest in an updated pcc port, I will write something up.

~Brian

> Index: devel/pcc-libs/Makefile
> ===================================================================
> RCS file: devel/pcc-libs/Makefile
> diff -N devel/pcc-libs/Makefile
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/pcc-libs/Makefile 21 May 2019 12:31:38 -0000
> @@ -0,0 +1,29 @@
> +# $OpenBSD: Makefile.template,v 1.80 2019/04/01 07:35:45 bentley Exp $
> +
> +ONLY_FOR_ARCHS =i386 amd64
> +
> +COMMENT = libraries for the portable C compiler
> +
> +PCCVER = 1.1.0
> +DISTNAME = pcc-libs-${PCCVER}
> +
> +CATEGORIES = devel
> +
> +HOMEPAGE = http://pcc.ludd.ltu.se/
> +
> +# BSD
> +PERMIT_PACKAGE_CDROM = Yes
> +
> +MASTER_SITES = http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ \
> + ftp://pcc.ludd.ltu.se/pub/pcc-releases/
> +
> +EXTRACT_SUFX = .tgz
> +
> +CONFIGURE_STYLE = gnu
> +
> +NO_TEST = Yes
> +
> +CONFIG = ${MACHINE_ARCH:S/amd64/x86_64/}-unknown-openbsd${OSREV}
> +SUBST_VARS = PCCVER CONFIG
> +
> +.include <bsd.port.mk>
> Index: devel/pcc-libs/distinfo
> ===================================================================
> RCS file: devel/pcc-libs/distinfo
> diff -N devel/pcc-libs/distinfo
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/pcc-libs/distinfo 21 May 2019 12:31:38 -0000
> @@ -0,0 +1,2 @@
> +SHA256 (pcc-libs-1.1.0.tgz) = 3UyxJNoLLtzabOuCPDyo/AWRnTXInDTexhdRev5rv+4=
> +SIZE (pcc-libs-1.1.0.tgz) = 198204
> Index: devel/pcc-libs/patches/patch-configure
> ===================================================================
> RCS file: devel/pcc-libs/patches/patch-configure
> diff -N devel/pcc-libs/patches/patch-configure
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/pcc-libs/patches/patch-configure 21 May 2019 12:31:38 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +
> +Index: configure
> +--- configure.orig
> ++++ configure
> +@@ -2046,6 +2046,7 @@ case "$target_os" in
> + targos=openbsd
> + case "$target_cpu" in
> + i?86) targmach=i386 ;;
> ++ x86_64) targmach=amd64 ;;
> + vax) targmach=vax ;;
> + powerpc) targmach=powerpc endian=big ;;
> + sparc64) targmach=sparc64 endian=big ;;
> Index: devel/pcc-libs/pkg/DESCR
> ===================================================================
> RCS file: devel/pcc-libs/pkg/DESCR
> diff -N devel/pcc-libs/pkg/DESCR
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/pcc-libs/pkg/DESCR 21 May 2019 12:31:38 -0000
> @@ -0,0 +1 @@
> +Libraries for the Portable C Compiler.
> Index: devel/pcc-libs/pkg/PLIST
> ===================================================================
> RCS file: devel/pcc-libs/pkg/PLIST
> diff -N devel/pcc-libs/pkg/PLIST
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ devel/pcc-libs/pkg/PLIST 21 May 2019 12:31:38 -0000
> @@ -0,0 +1,19 @@
> +@comment $OpenBSD: PLIST,v$
> +lib/pcc/
> +lib/pcc/${CONFIG}/
> +lib/pcc/${CONFIG}/${PCCVER}/
> +lib/pcc/${CONFIG}/${PCCVER}/include/
> +lib/pcc/${CONFIG}/${PCCVER}/include/float.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/iso646.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_float.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_limits.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_stdarg.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_stdbool.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/libpcc_stddef.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/limits.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/stdarg.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/stdbool.h
> +lib/pcc/${CONFIG}/${PCCVER}/include/stddef.h
> +lib/pcc/${CONFIG}/${PCCVER}/lib/
> +lib/pcc/${CONFIG}/${PCCVER}/lib/libpcc.a
> +lib/pcc/${CONFIG}/${PCCVER}/lib/libpccsoftfloat.a
> Index: lang/pcc/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/pcc/Makefile,v
> retrieving revision 1.17
> diff -u -p -r1.17 Makefile
> --- lang/pcc/Makefile 3 May 2019 16:59:10 -0000 1.17
> +++ lang/pcc/Makefile 21 May 2019 12:31:38 -0000
> @@ -1,19 +1,15 @@
> # $OpenBSD: Makefile,v 1.17 2019/05/03 16:59:10 danj Exp $
>
> +ONLY_FOR_ARCHS =i386 amd64
> +
> COMMENT = portable C compiler
>
> -PCCVER = 1.0.0
> -DISTNAME = pcc-${PCCVER}
> -REVISION = 14
> -EXTRACT_SUFX = .tgz
> +DISTNAME = pcc-1.1.0
>
> CATEGORIES = lang
>
> HOMEPAGE = http://pcc.ludd.ltu.se/
>
> -# Other architectures not fully supported yet
> -ONLY_FOR_ARCHS = i386 amd64
> -
> # BSD
> PERMIT_PACKAGE_CDROM = Yes
>
> @@ -22,10 +18,11 @@ WANTLIB += c
> MASTER_SITES = http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ \
> ftp://pcc.ludd.ltu.se/pub/pcc-releases/
>
> -CONFIGURE_STYLE = gnu
> +EXTRACT_SUFX = .tgz
> +
> +RUN_DEPENDS = devel/pcc-libs
>
> -CONFIG = ${MACHINE_ARCH:S/amd64/x86_64/}-unknown-openbsd${OSREV}
> -SUBST_VARS = PCCVER CONFIG
> +CONFIGURE_STYLE = gnu
>
> do-test:
> cd ${WRKBUILD} && ./cc/cc/pcc --version
> Index: lang/pcc/distinfo
> ===================================================================
> RCS file: /cvs/ports/lang/pcc/distinfo,v
> retrieving revision 1.2
> diff -u -p -r1.2 distinfo
> --- lang/pcc/distinfo 18 Jan 2015 03:14:19 -0000 1.2
> +++ lang/pcc/distinfo 21 May 2019 12:31:38 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (pcc-1.0.0.tgz) = WALbukbW6j+brapVuQRKBBa7QQAgwkpcKoouqvQRVss=
> -SIZE (pcc-1.0.0.tgz) = 652308
> +SHA256 (pcc-1.1.0.tgz) = 2eP+2Ex2fc3e+2sfhU1dqJIfP2XYvQKZd0NBL0FHTWQ=
> +SIZE (pcc-1.1.0.tgz) = 848427
> Index: lang/pcc/patches/patch-cc_cc_cc_c
> ===================================================================
> RCS file: lang/pcc/patches/patch-cc_cc_cc_c
> diff -N lang/pcc/patches/patch-cc_cc_cc_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ lang/pcc/patches/patch-cc_cc_cc_c 21 May 2019 12:31:38 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: cc/cc/cc.c
> +--- cc/cc/cc.c.orig
> ++++ cc/cc/cc.c
> +@@ -206,7 +206,7 @@ char *cppmdadd[] = CPPMDADD;
> + #define PCCLIBDIR NULL
> +

No comments:

Post a Comment