diff --git a/utils/langkit_support.gpr.patch b/utils/langkit_support.gpr.patch new file mode 100644 index 000000000..4621c9e23 --- /dev/null +++ b/utils/langkit_support.gpr.patch @@ -0,0 +1,16 @@ +--- langkit_support.gpr.old ++++ langkit_support.gpr +@@ -53,10 +53,10 @@ + "Langkit_Support.Tree_Traversal_Iterator", + "Langkit_Support.Vectors"); + +- for Source_Dirs use ("/tmp/langkit-21.0.0/langkit/support"); ++ for Source_Dirs use ("src"); + for Library_Dir use +- "../langkit_support/" & Library_Kind_Param & "/" & Build_Mode; +- for Object_Dir use "../../obj/langkit_support/" & Build_Mode; ++ "lib/" & Library_Kind_Param & "/" & Build_Mode; ++ for Object_Dir use "obj/" & Build_Mode; + + Common_Ada_Cargs := ("-gnatwa", "-gnatyg", "-fPIC"); + diff --git a/utils/release-langkit_support.sh b/utils/release-langkit_support.sh new file mode 100755 index 000000000..08493610c --- /dev/null +++ b/utils/release-langkit_support.sh @@ -0,0 +1,27 @@ +#! /bin/sh + +set -e + +RELEASE=21.0.0 +SRC_PKG=/tmp/langkit_support-$RELEASE.tar.gz + +# Make sure the appropriate Langkit sources are checked out in +# /tmp/langkit-$RELEASE +SRC_DIR=/tmp/langkit-$RELEASE +export PYTHONPATH=$SRC_DIR:$PYTHONPATH + +BUILD_DIR=/tmp/langkit_support-$RELEASE +rm -rf $BUILD_DIR + +# Generate "langkit_support.gpr", move it to the top directory and import +# sources. Then adjust source/object/library dirs. +$SRC_DIR/scripts/build-langkit_support.py --build-dir=$BUILD_DIR generate +mv $BUILD_DIR/lib/gnat/langkit_support.gpr $BUILD_DIR/ +rm -r $BUILD_DIR/lib +mkdir $BUILD_DIR/src +cp -ar $SRC_DIR/langkit/support/*.ad* $BUILD_DIR/src +patch -d $BUILD_DIR -p0 -f -i $SRC_DIR/utils/langkit_support.gpr.patch + +# Create the release tarball +tar czf $SRC_PKG -C /tmp langkit_support-$RELEASE +sha512sum $SRC_PKG