-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New script to create a source package for Langkit_Support
TN: TA19-011
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |