|
62 | 62 | description="Copy CVC4 binaries to the root folder along with the version postfix."> |
63 | 63 | <fail unless="cvc4.path"> |
64 | 64 | Please specify the path to CVC4 with the flag -Dcvc4.path=/path/to/cvc4. |
65 | | - The path has to point to the root CVC4 folder. |
| 65 | + The path has to point to the root CVC4 folder, i.e., |
| 66 | + a checkout of the official git repositoy from 'https://github.com/CVC4/CVC4.git'. |
66 | 67 | Note that shell substitutions do not work and a full absolute |
67 | 68 | path has to be specified. |
68 | 69 | </fail> |
69 | 70 | <fail unless="cvc4.customRev"> |
70 | 71 | Please specify a custom revision with the flag -Dcvc4.customRev=XXX. |
71 | 72 | The custom revision has to be unique amongst the already known version |
72 | | - numbers from the ivy repository. |
| 73 | + numbers from the ivy repository. The script will append the git revision. |
73 | 74 | </fail> |
74 | | - <exec executable="sed" dir="${cvc4.path}/builds" outputproperty="cvc4.version"> |
75 | | - <arg value="-n" /> |
76 | | - <arg value="-e" /> |
77 | | - <arg value="s/distdir = cvc4-/${cvc4.customRev}/p" /> |
78 | | - <arg value="Makefile" /> |
| 75 | + |
| 76 | + <!-- get a nive version --> |
| 77 | + <exec executable="git" dir="${cvc4.path}" outputproperty="cvc4.revision"> |
| 78 | + <arg value="show"/> |
| 79 | + <arg value="-s"/> |
| 80 | + <arg value="--format=%h"/> |
| 81 | + </exec> |
| 82 | + <property name="cvc4.version" value="${cvc4.customRev}-g${cvc4.revision}"/> |
| 83 | + <echo message="Building CVC4 in version '${cvc4.version}'"/> |
| 84 | + |
| 85 | + <!-- build CVC4 --> |
| 86 | + <exec executable="rm" dir="${cvc4.path}"> |
| 87 | + <arg value="-rf"/> |
| 88 | + <arg value="symfpu-CVC4"/> |
| 89 | + </exec> |
| 90 | + <exec executable="./contrib/get-symfpu" dir="${cvc4.path}"/> |
| 91 | + <exec executable="./configure.sh" dir="${cvc4.path}"> |
| 92 | + <arg value="--symfpu"/> |
| 93 | + <arg value="--language-bindings=java"/> |
79 | 94 | </exec> |
80 | | - <exec executable="strip" dir="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/bindings/java/.libs"> |
| 95 | + <exec executable="make" dir="${cvc4.path}/build/"> |
| 96 | + <arg value="-j4" /> |
| 97 | + </exec> |
| 98 | + |
| 99 | + <!-- remove unneeded symbols --> |
| 100 | + <exec executable="strip" dir="${cvc4.path}/build/src/bindings/java/"> |
81 | 101 | <arg value="libcvc4jni.so" /> |
82 | 102 | </exec> |
83 | | - <exec executable="strip" dir="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/.libs"> |
| 103 | + <exec executable="strip" dir="${cvc4.path}/build/src/"> |
84 | 104 | <arg value="libcvc4.so" /> |
85 | 105 | </exec> |
86 | | - <exec executable="strip" dir="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/parser/.libs"> |
| 106 | + <exec executable="strip" dir="${cvc4.path}/build/src/parser/"> |
87 | 107 | <arg value="libcvc4parser.so" /> |
88 | 108 | </exec> |
89 | 109 |
|
90 | | - <exec executable="chrpath" dir="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/bindings/java/.libs"> |
91 | | - <arg value="-r" /> |
92 | | - <arg value="$ORIGIN" /> |
93 | | - <arg value="libcvc4jni.so" /> |
| 110 | + <!-- fix RPATH and library dependencies --> |
| 111 | + <exec executable="patchelf" dir="${cvc4.path}/build/src/parser/"> |
| 112 | + <arg value="--set-rpath"/><arg value="$ORIGIN"/> |
| 113 | + <arg value="--replace-needed"/><arg value="libcvc4.so.6"/><arg value="libcvc4.so"/> |
| 114 | + <arg value="libcvc4parser.so"/> |
94 | 115 | </exec> |
95 | | - <exec executable="chrpath" dir="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/parser/.libs"> |
96 | | - <arg value="-r" /> |
97 | | - <arg value="$ORIGIN" /> |
98 | | - <arg value="libcvc4parser.so" /> |
| 116 | + <exec executable="patchelf" dir="${cvc4.path}/build/src/bindings/java/"> |
| 117 | + <arg value="--set-rpath"/><arg value="$ORIGIN"/> |
| 118 | + <arg value="--replace-needed"/><arg value="libcvc4.so.6"/><arg value="libcvc4.so"/> |
| 119 | + <arg value="--replace-needed"/><arg value="libcvc4parser.so.6"/><arg value="libcvc4parser.so"/> |
| 120 | + <arg value="libcvc4jni.so"/> |
99 | 121 | </exec> |
100 | 122 |
|
101 | | - <copy file="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/bindings/java/.libs/libcvc4jni.so" tofile="libcvc4jni-${cvc4.version}.so"/> |
102 | | - <copy file="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/.libs/libcvc4.so" tofile="libcvc4.so-${cvc4.version}.3"/> |
103 | | - <copy file="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/parser/.libs/libcvc4parser.so" tofile="libcvc4parser.so-${cvc4.version}.3"/> |
104 | | - <copy file="${cvc4.path}/builds/x86_64-unknown-linux-gnu/production/src/bindings/CVC4.jar" tofile="CVC4-${cvc4.version}.jar"/> |
| 123 | + <!-- copy library files into directory to be published for IVY --> |
| 124 | + <copy file="${cvc4.path}/build/src/libcvc4.so" tofile="libcvc4-${cvc4.version}.so"/> |
| 125 | + <copy file="${cvc4.path}/build/src/parser/libcvc4parser.so" tofile="libcvc4parser-${cvc4.version}.so"/> |
| 126 | + <copy file="${cvc4.path}/build/src/bindings/java/libcvc4jni.so" tofile="libcvc4jni-${cvc4.version}.so"/> |
| 127 | + <copy file="${cvc4.path}/build/src/bindings/java/CVC4.jar" tofile="CVC4-${cvc4.version}.jar"/> |
105 | 128 | </target> |
106 | 129 |
|
107 | 130 | <target name="publish-cvc4" depends="package-cvc4, load-ivy" |
|
0 commit comments