Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colm & ragel: updates of both ports and fixes for PPC #15762

Merged
merged 2 commits into from
Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions lang/colm/Portfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0

name colm
version 0.13.0.7
# Please keep commit-based set-up until next release
github.setup adrian-thurston colm d00ef7930a9d42469c19a5880744a086065ee20c
version 0.14.7
revision 0
epoch 1
categories lang devel
platforms darwin
license MIT

maintainers nomaintainer
Expand All @@ -20,18 +21,28 @@ long_description Colm is a programming language designed for the analysis \
program transformation languages.

homepage http://www.colm.net/open-source/colm/
master_sites http://www.colm.net/files/colm/

checksums rmd160 9cecac9654fd13570334effce29582e7be10ab13 \
sha256 e43fa328ad7672f485848bf4f40ae498a1925ce5199f2d94e4828e13628ee638 \
size 746841
checksums rmd160 8d98e88613557d0064eb19271c34715becaa1bdb \
sha256 7916fe38ef3d2fb8c280663bff7852dccfd0e197ff5f73951305fe05b1c2a797 \
size 1764023

use_autoconf yes
autoconf.cmd ./autogen.sh

depends_build-append \
port:autoconf \
port:automake \
port:libtool \
port:pkgconfig

platform darwin 10 powerpc {
# Rosetta gets it wrong otherwise
configure.args-append \
--build=powerpc-apple-darwin${os.major}
}

post-destroot {
xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} ChangeLog README \
xinstall -m 644 -W ${worksrcpath} README.md \
${destroot}${prefix}/share/doc/${name}
}

livecheck.type regex
livecheck.url ${homepage}
livecheck.regex {colm-(\d+(?:\.\d+)*).tar.gz}
39 changes: 29 additions & 10 deletions lang/ragel/Portfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0

name ragel
version 7.0.0.12
# Please keep commit-based set-up until next release
github.setup adrian-thurston ragel d4577c924451b331c73c8ed0af04f6efd35ac0b4
version 7.0.4
revision 0
categories lang devel
platforms darwin
license MIT

maintainers nomaintainer
Expand All @@ -21,14 +22,32 @@ long_description Ragel compiles executable finite state machines from \
language.

homepage http://www.colm.net/open-source/ragel/
master_sites http://www.colm.net/files/ragel/

checksums rmd160 39f37e804b9cc8b5a117350a5643791458c2b2b3 \
sha256 3999ef97fb108b39d11d9b96986f5e05c74bd95de8dd474301d86c5aca887a74 \
size 1543127
checksums rmd160 838fb6f2803e7c166f2a98ec4de8eaf9f0c9ad19 \
sha256 2208c0e2a4ec575f1e8bf27a0563f0bbf4afb3a28a97bed01c2376f1d75759a0 \
size 455645

depends_lib-append port:colm

livecheck.type regex
livecheck.url ${homepage}
livecheck.regex {ragel-(\d+(?:\.\d+)*).tar.gz}
patchfiles patch-lafiles.diff

use_autoconf yes
autoconf.cmd ./autogen.sh

depends_build-append \
port:autoconf \
port:automake \
port:libtool \
port:pkgconfig

configure.args-append \
--with-colm=${prefix}

configure.ldflags-append \
-L${prefix}/lib -lfsm

platform darwin 10 powerpc {
# Rosetta gets it wrong otherwise
configure.args-append \
--build=powerpc-apple-darwin${os.major}
}
41 changes: 41 additions & 0 deletions lang/ragel/files/patch-lafiles.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# https://github.com/adrian-thurston/ragel/pull/85

--- configure.ac.orig 2021-12-29 04:19:46.000000000 +0800
+++ configure.ac 2022-10-08 06:19:57.000000000 +0800
@@ -47,13 +47,23 @@
CPPFLAGS="-I$withval/include ${CPPFLAGS}"
CPPFLAGS="-I$withval/include/aapl ${CPPFLAGS}"
LDFLAGS="-L$withval/lib ${LDFLAGS}"
- LIBCOLM_LA="$withval/lib/libcolm.la"
- LIBFSM_LA="$withval/lib/libfsm.la"
COLM_SHARE="$withval/share/colm"
],
[]
)

+AC_CHECK_LIB(
+ [colm],
+ [colm_run_program],
+ [LIBCOLM_LA=-lcolm],
+ [AC_ERROR([libcolm is required to build ragel])]
+)
+AC_CHECK_LIB(
+ [fsm],
+ [LIBFSM_LA=-lfsm],
+ [AC_ERROR([libfsm is required to build ragel])]
+)
+
AC_CHECK_FILES(
[$COLM],
[],

--- src/Makefile.am.orig 2021-12-29 04:19:46.000000000 +0800
+++ src/Makefile.am 2022-10-08 06:05:53.000000000 +0800
@@ -40,7 +40,6 @@
parse.c rlreduce.cc

ragel_LDADD = $(LIBFSM_LA) $(LIBCOLM_LA) libragel.la
-ragel_DEPENDENCIES = $(LIBFSM_LA) $(LIBCOLM_LA) libragel.la

BUILT_SOURCES = \
version.h \