Skip to content

Commit

Permalink
lang/pharo: update to 12.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dieken committed Nov 1, 2024
1 parent 68d25f2 commit 83d5be2
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 38 deletions.
21 changes: 11 additions & 10 deletions lang/pharo/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PORTNAME= pharo
DISTVERSION= 10.0.9
DISTVERSIONSUFFIX= de76067
PORTREVISION= 3
DISTVERSION= 12.0.0
DISTVERSIONSUFFIX= 56a36ec
CATEGORIES= lang
MASTER_SITES= http://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/source/
DISTNAME= PharoVM-${DISTVERSION}-${DISTVERSIONSUFFIX}-Linux-x86_64-c-src
#DISTNAME= PharoVM-${DISTVERSION}-${DISTVERSIONSUFFIX}-Linux-x86_64-c-src
DISTNAME= latest12

MAINTAINER= [email protected]
COMMENT= Smalltalk-inspired language and environment
Expand All @@ -13,6 +13,7 @@ WWW= http://www.pharo.org/
LICENSE= MIT

LIB_DEPENDS= libffi.so:devel/libffi \
libepoll-shim.so:devel/libepoll-shim \
libgit2.so:devel/libgit2 \
libcairo.so:graphics/cairo \
libfreetype.so:print/freetype2 \
Expand All @@ -22,7 +23,7 @@ LIB_DEPENDS= libffi.so:devel/libffi \

USES= cmake ssl
CMAKE_ARGS= -DFLAVOUR=CoInterpreter \
-DPHARO_BIN_LOCATION=${PREFIX}/libexec/pharo10 \
-DPHARO_BIN_LOCATION=${PREFIX}/libexec/pharo12 \
-DGENERATED_SOURCE_DIR=.
CMAKE_ON= ALWAYS_INTERACTIVE BUILD_IS_RELEASE
CMAKE_OFF= GENERATE_SOURCES BUILD_BUNDLE
Expand All @@ -33,15 +34,15 @@ USE_HCC= yes
USE_SDL= sdl image

do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/pharo10
${MKDIR} ${STAGEDIR}${PREFIX}/lib/pharo10
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/pharo12
${MKDIR} ${STAGEDIR}${PREFIX}/lib/pharo12
cd ${WRKDIR}/.build/build/packaging/linux/bin && \
${INSTALL_SCRIPT} pharo ${STAGEDIR}${PREFIX}/bin/pharo10
${INSTALL_SCRIPT} pharo ${STAGEDIR}${PREFIX}/bin/pharo12
cd ${WRKDIR}/.build/build/vm && \
${INSTALL_PROGRAM} pharo ${STAGEDIR}${PREFIX}/libexec/pharo10/pharo
${INSTALL_PROGRAM} pharo ${STAGEDIR}${PREFIX}/libexec/pharo12/pharo
cd ${WRKDIR}/.build/build/vm && \
${FIND} . -type f -name "*.so" | while read file; do \
${INSTALL_LIB} $$file ${STAGEDIR}${PREFIX}/lib/pharo10/$$file; \
${INSTALL_LIB} $$file ${STAGEDIR}${PREFIX}/lib/pharo12/$$file; \
done

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions lang/pharo/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1700701195
SHA256 (PharoVM-10.0.9-de76067-Linux-x86_64-c-src.tar.gz) = e797b3b00be38fbd158ffba732d175307fe9928421529e1f5b96a9e553f018bf
SIZE (PharoVM-10.0.9-de76067-Linux-x86_64-c-src.tar.gz) = 3875300
TIMESTAMP = 1730004562
SHA256 (latest12.tar.gz) = 36f75ba3523ae40829ad8608d801bb950c9d85f13849f210b474794c1ea5b747
SIZE (latest12.tar.gz) = 4120425
19 changes: 19 additions & 0 deletions lang/pharo/files/patch-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- CMakeLists.txt.orig 2024-10-27 15:47:01.856844000 +0800
+++ CMakeLists.txt 2024-10-27 16:21:30.499092000 +0800
@@ -519,6 +519,7 @@
${PHARO_CURRENT_GENERATED}/vm/include
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include/semaphores
+ /usr/local/include/libepoll-shim
)
add_platform_headers()

@@ -549,7 +550,7 @@
)
endif()

-target_link_libraries(${VM_EXECUTABLE_NAME} ${VM_LIBRARY_NAME})
+target_link_libraries(${VM_EXECUTABLE_NAME} ${VM_LIBRARY_NAME} /usr/local/lib/libepoll-shim.so)

add_required_libs_per_platform()

20 changes: 15 additions & 5 deletions lang/pharo/files/patch-packaging_linux_bin_launch.sh.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
--- packaging/linux/bin/launch.sh.in.orig 2023-11-23 00:48:34 UTC
+++ packaging/linux/bin/launch.sh.in
@@ -27,13 +27,13 @@ fi
--- packaging/linux/bin/launch.sh.in.orig 2024-10-27 21:33:11.104610000 +0800
+++ packaging/linux/bin/launch.sh.in 2024-10-27 21:34:38.820987000 +0800
@@ -27,13 +27,13 @@
# and so it should take precedence over /lib libc. This is done by setting
# LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM.
#Try extracting Libc
-LIBC_SO="`/usr/bin/ldd "$BIN/@VM_EXECUTABLE_NAME@" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+LIBC_SO="`ldd "$BIN/@VM_EXECUTABLE_NAME@" | grep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+LIBC_SO="`/usr/bin/ldd "$BIN/@VM_EXECUTABLE_NAME@" | grep -F /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
PLATFORMLIBDIR=`expr "$LIBC_SO" : '\(.*\)/libc.*'`

#If empty try extracting Musl
if [ "$PLATFORMLIBDIR" = "" ]; then
{
- LIBC_SO="`/usr/bin/ldd "$BIN/@VM_EXECUTABLE_NAME@" | /bin/fgrep libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+ LIBC_SO="`ldd "$BIN/@VM_EXECUTABLE_NAME@" | grep libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+ LIBC_SO="`/usr/bin/ldd "$BIN/@VM_EXECUTABLE_NAME@" | grep -F libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
PLATFORMLIBDIR=`expr "$LIBC_SO" : '\(.*\)/ld-musl.*'`
}
fi
@@ -59,7 +59,7 @@
# in the same directory as the VM. We must include at least /lib and /usr/lib
# if libraries there-in are to be found. These directories are not implicit.
case $PLATFORMLIBDIR in
-/lib|/usr/lib) SVMLLP=/lib:/usr/lib;;
-*) SVMLLP="$PLATFORMLIBDIR:/lib:/usr$PLATFORMLIBDIR:/usr/lib"
+/lib|/usr/lib) SVMLLP=/lib:/usr/lib:/usr/local/lib/pharo12;;
+*) SVMLLP="$PLATFORMLIBDIR:/lib:/usr$PLATFORMLIBDIR:/usr/lib:/usr/local/lib/pharo12"
esac
LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/@VM_EXECUTABLE_NAME@" "$@"
36 changes: 36 additions & 0 deletions lang/pharo/files/patch-src_memoryUnix.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--- src/memoryUnix.c.orig 2024-10-28 16:20:50
+++ src/memoryUnix.c 2024-10-28 16:59:48
@@ -101,9 +101,9 @@
#if __APPLE__
int additionalFlags = MAP_JIT;
#else
- int additionalFlags = 0;
+ int additionalFlags = desiredPosition ? MAP_FIXED : 0;
#endif
-
+
logDebug("Trying to allocate JIT memory in %p\n", (void* )desiredBaseAddressAligned);

if (MAP_FAILED == (result = mmap((void*) desiredBaseAddressAligned, alignedSize,
@@ -124,6 +124,12 @@
sqInt heapSize = 0;
sqInt heapLimit = 0;

+#if __APPLE__
+ int additionalFlags = 0;
+#else
+ int additionalFlags = desiredBaseAddress ? MAP_FIXED : 0;
+#endif
+
pageSize = getpagesize();
pageMask = ~(pageSize - 1);

@@ -142,7 +148,7 @@
(void* )desiredBaseAddressAligned);

while ((!heap) && (heapLimit >= minHeapSize)) {
- if (MAP_FAILED == (heap = mmap((void*) desiredBaseAddressAligned, heapLimit, MAP_PROT, MAP_FLAGS, devZero, 0))) {
+ if (MAP_FAILED == (heap = mmap((void*) desiredBaseAddressAligned, heapLimit, MAP_PROT, MAP_FLAGS | additionalFlags, devZero, 0))) {
heap = 0;
heapLimit = valign(heapLimit / 4 * 3);
}
41 changes: 21 additions & 20 deletions lang/pharo/pkg-plist
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
bin/pharo10
lib/pharo10/libB2DPlugin.so
lib/pharo10/libBitBltPlugin.so
lib/pharo10/libDSAPrims.so
lib/pharo10/libFileAttributesPlugin.so
lib/pharo10/libFilePlugin.so
lib/pharo10/libFloatArrayPlugin.so
lib/pharo10/libJPEGReadWriter2Plugin.so
lib/pharo10/libJPEGReaderPlugin.so
lib/pharo10/libLargeIntegers.so
lib/pharo10/libLocalePlugin.so
lib/pharo10/libMiscPrimitivePlugin.so
lib/pharo10/libPharoVMCore.so
lib/pharo10/libSocketPlugin.so
lib/pharo10/libSqueakSSL.so
lib/pharo10/libSurfacePlugin.so
lib/pharo10/libTestLibrary.so
lib/pharo10/libUUIDPlugin.so
lib/pharo10/libUnixOSProcessPlugin.so
libexec/pharo10/pharo
bin/pharo12
lib/pharo12/libB2DPlugin.so
lib/pharo12/libBitBltPlugin.so
lib/pharo12/libDSAPrims.so
lib/pharo12/libFileAttributesPlugin.so
lib/pharo12/libFilePlugin.so
lib/pharo12/libFloatArrayPlugin.so
lib/pharo12/libJPEGReadWriter2Plugin.so
lib/pharo12/libJPEGReaderPlugin.so
lib/pharo12/libLargeIntegers.so
lib/pharo12/libLocalePlugin.so
lib/pharo12/libMiscPrimitivePlugin.so
lib/pharo12/libPharoVMCore.so
lib/pharo12/libSocketPlugin.so
lib/pharo12/libSqueakSSL.so
lib/pharo12/libSurfacePlugin.so
lib/pharo12/libTestLibrary.so
lib/pharo12/libUUIDPlugin.so
lib/pharo12/libUnixOSProcessPlugin.so
lib/pharo12/libtty.so
libexec/pharo12/pharo

0 comments on commit 83d5be2

Please sign in to comment.