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

Skip re-download and re-compile of APR / *SSL when already done before. #390

Merged
merged 1 commit into from Sep 18, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
70 changes: 40 additions & 30 deletions boringssl-static/pom.xml
Expand Up @@ -135,42 +135,52 @@
<!-- Add the ant tasks from ant-contrib -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />

<mkdir dir="${boringsslBuildDir}" />

<if>
<equals arg1="${os.detected.name}" arg2="windows" />
<available file="${boringsslBuildDir}" />
<then>
<!-- On Windows, build with /MT for static linking -->
<property name="cmakeAsmFlags" value="" />
<property name="cmakeCFlags" value="/MT" />
<property name="cmakeCxxFlags" value="/MT" />
<echo message="BoringSSL was already build, skipping the build step." />
</then>
<elseif>
<equals arg1="${os.detected.name}" arg2="linux" />
<then>
<!-- On *nix, add ASM flags to disable executable stack -->
<property name="cmakeAsmFlags" value="-Wa,--noexecstack" />
<property name="cmakeCFlags" value="-std=c99 -O3 -fno-omit-frame-pointer" />
<property name="cmakeCxxFlags" value="-O3 -fno-omit-frame-pointer -Wno-error=maybe-uninitialized" />
</then>
</elseif>
<else>
<!-- On *nix, add ASM flags to disable executable stack -->
<property name="cmakeAsmFlags" value="-Wa,--noexecstack" />
<property name="cmakeCFlags" value="-std=c99 -O3 -fno-omit-frame-pointer" />
<property name="cmakeCxxFlags" value="-O3 -fno-omit-frame-pointer" />
<echo message="Building BoringSSL" />

<mkdir dir="${boringsslBuildDir}" />

<if>
<equals arg1="${os.detected.name}" arg2="windows" />
<then>
<!-- On Windows, build with /MT for static linking -->
<property name="cmakeAsmFlags" value="" />
<property name="cmakeCFlags" value="/MT" />
<property name="cmakeCxxFlags" value="/MT" />
</then>
<elseif>
<equals arg1="${os.detected.name}" arg2="linux" />
<then>
<!-- On *nix, add ASM flags to disable executable stack -->
<property name="cmakeAsmFlags" value="-Wa,--noexecstack" />
<property name="cmakeCFlags" value="-std=c99 -O3 -fno-omit-frame-pointer" />
<property name="cmakeCxxFlags" value="-O3 -fno-omit-frame-pointer -Wno-error=maybe-uninitialized" />
</then>
</elseif>
<else>
<!-- On *nix, add ASM flags to disable executable stack -->
<property name="cmakeAsmFlags" value="-Wa,--noexecstack" />
<property name="cmakeCFlags" value="-std=c99 -O3 -fno-omit-frame-pointer" />
<property name="cmakeCxxFlags" value="-O3 -fno-omit-frame-pointer" />
</else>
</if>
<exec executable="cmake" failonerror="true" dir="${boringsslBuildDir}" resolveexecutable="true">
<arg value="-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE" />
<arg value="-DCMAKE_BUILD_TYPE=Release" />
<arg value="-DCMAKE_ASM_FLAGS=${cmakeAsmFlags}" />
<arg value="-DCMAKE_C_FLAGS_RELEASE=${cmakeCFlags}" />
<arg value="-DCMAKE_CXX_FLAGS_RELEASE=${cmakeCxxFlags}" />
<arg value="-GNinja" />
<arg value=".." />
</exec>
<exec executable="ninja" failonerror="true" dir="${boringsslBuildDir}" resolveexecutable="true" />
</else>
</if>
<exec executable="cmake" failonerror="true" dir="${boringsslBuildDir}" resolveexecutable="true">
<arg value="-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE" />
<arg value="-DCMAKE_BUILD_TYPE=Release" />
<arg value="-DCMAKE_ASM_FLAGS=${cmakeAsmFlags}" />
<arg value="-DCMAKE_C_FLAGS_RELEASE=${cmakeCFlags}" />
<arg value="-DCMAKE_CXX_FLAGS_RELEASE=${cmakeCxxFlags}" />
<arg value="-GNinja" />
<arg value=".." />
</exec>
<exec executable="ninja" failonerror="true" dir="${boringsslBuildDir}" resolveexecutable="true" />
</target>
</configuration>
</execution>
Expand Down
41 changes: 27 additions & 14 deletions libressl-static/pom.xml
Expand Up @@ -172,20 +172,33 @@
</goals>
<configuration>
<target>
<get src="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${libresslArchive}" dest="${project.build.directory}/${libresslArchive}" verbose="on" />
<checksum file="${project.build.directory}/${libresslArchive}" algorithm="SHA-256" property="${libresslSha256}" verifyProperty="isEqual" />
<exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true">
<arg value="xfv" />
<arg value="${libresslArchive}" />
</exec>
<mkdir dir="${sslHome}" />
<exec executable="configure" failonerror="true" dir="${libresslCheckoutDir}" resolveexecutable="true">
<arg line="--disable-shared --prefix=${sslHome} CFLAGS='-O3 -fno-omit-frame-pointer -fPIC'" />
</exec>
<exec executable="make" failonerror="true" dir="${libresslCheckoutDir}" resolveexecutable="true" />
<exec executable="make" failonerror="true" dir="${libresslCheckoutDir}" resolveexecutable="true">
<arg line="install" />
</exec>
<!-- Add the ant tasks from ant-contrib -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />

<if>
<available file="${sslHome}" />
<then>
<echo message="LibreSSL was already build, skipping the build step." />
</then>
<else>
<echo message="Downloading and building LibreSSL" />

<get src="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${libresslArchive}" dest="${project.build.directory}/${libresslArchive}" verbose="on" />
<checksum file="${project.build.directory}/${libresslArchive}" algorithm="SHA-256" property="${libresslSha256}" verifyProperty="isEqual" />
<exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true">
<arg value="xfv" />
<arg value="${libresslArchive}" />
</exec>
<mkdir dir="${sslHome}" />
<exec executable="configure" failonerror="true" dir="${libresslCheckoutDir}" resolveexecutable="true">
<arg line="--disable-shared --prefix=${sslHome} CFLAGS='-O3 -fno-omit-frame-pointer -fPIC'" />
</exec>
<exec executable="make" failonerror="true" dir="${libresslCheckoutDir}" resolveexecutable="true" />
<exec executable="make" failonerror="true" dir="${libresslCheckoutDir}" resolveexecutable="true">
<arg line="install" />
</exec>
</else>
</if>
</target>
</configuration>
</execution>
Expand Down