Skip to content

Commit b09c84f

Browse files
committed
Add correct shipping for V8 and check for post install script in deployment in order to avoid netcore to be installed multiple times.
1 parent 698fecf commit b09c84f

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

cmake

Submodule cmake updated from 6d88ccd to 3cdc566

deploy/packages/pack-metacall.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,16 @@ endif()
184184
set(CPACK_DEBIAN_PACKAGE_NAME "${package_name}")
185185
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
186186
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
187+
set(CPACK_DEBIAN_RUNTIME_PACKAGE_DEPENDS "bash (>= 4.4-5), curl (>= 7.52.1-5), libc6 (>= 2.24-11), libgcc1 (>= 1:6.3.0-18), libpython3.5 (>= 3.5.3-1), libruby (>= 1:2.3.3), libicu57 (>= 57.1-6), libunwind8 (>= 1.1-4.1)")
187188
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${package_maintainer}")
188-
set(CPACK_DEBIAN_PACKAGE_DEPENDS "bash (>= 4.4-5), curl (>= 7.52.1-5), libc6 (>= 2.24-11), libgcc1 (>= 1:6.3.0-18), libpython3.5 (>= 3.5.3-1), libruby (>= 1:2.3.3), libicu57 (>= 57.1-6), libunwind8 (>= 1.1-4.1)")
189189
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
190190
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
191191
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
192-
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "")
193192
set(CPACK_DEB_COMPONENT_INSTALL ${PACK_COMPONENT_INSTALL})
194-
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/packages/postinst")
195193
#set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "")
196194
#set(CPACK_DEBIAN_PACKAGE_SUGGESTS "")
197195
#set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
196+
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/packages/postinst")
198197

199198
#
200199
# RPM package

deploy/packages/postinst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@
1919
# limitations under the License.
2020
#
2121

22+
NETCORE_INSTALL_DIR=/usr/share/dotnet
23+
2224
# Download and install NetCore
23-
curl -s https://dot.net/v1/dotnet-install.sh &> dotnet-install.sh \
24-
&& chmod +x dotnet-install.sh \
25-
&& ./dotnet-install.sh --runtime dotnet --channel 1.0 --version 1.1.10 --install-dir /usr/share/dotnet \
26-
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
27-
&& rm dotnet-install.sh
25+
if [ ! -f $NETCORE_INSTALL_DIR/dotnet ]; then
26+
curl -s https://dot.net/v1/dotnet-install.sh &> dotnet-install.sh \
27+
&& chmod +x dotnet-install.sh \
28+
&& ./dotnet-install.sh --runtime dotnet --channel 1.0 --version 1.1.10 --install-dir $NETCORE_INSTALL_DIR \
29+
&& ln -s $NETCORE_INSTALL_DIR/dotnet /usr/bin/dotnet \
30+
&& rm dotnet-install.sh
31+
fi

source/loaders/js_loader/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ endif()
77
# External dependencies
88
#
99

10-
find_package(V8 5.1.117)
10+
set(ICU_FIND_VERSION 52.1)
11+
12+
find_package(V8 5.1.117) # 5.8.283
1113

1214
if(NOT V8_FOUND)
1315
message(STATUS "V8 libraries not found")
@@ -227,7 +229,7 @@ install(TARGETS ${target}
227229

228230
# Runtime (pack the runtime meanwhile V8 is not distributed correctly as a library)
229231
install(FILES
230-
${V8_LIBRARIES_VERSION}
232+
${V8_LIBRARIES_DEPENDS}
231233
DESTINATION ${INSTALL_LIB}
232234
COMPONENT runtime
233235
)

tools/metacall-environment.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ sub_netcore(){
155155
sub_v8repo(){
156156
echo "configure v8 from repository"
157157
cd $ROOT_DIR
158-
$SUDO_CMD apt-get -y --no-install-recommends install add-apt-key
159158
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install software-properties-common
160159

161160
# V8 5.1
@@ -183,19 +182,19 @@ sub_v8repo(){
183182
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu55 libv8-5.2-dev
184183
fi
185184

186-
# V8 5.8
187-
if [ $INSTALL_V8REPO58 = 1 ]; then
188-
$SUDO_CMD add-apt-repository -y ppa:pinepain/libv8-5.8
189-
$SUDO_CMD apt-get update
190-
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu55 libv8-5.8-dev
191-
fi
192-
193185
# V8 5.7
194186
if [ $INSTALL_V8REPO57 = 1 ]; then
195187
$SUDO_CMD add-apt-repository -y ppa:pinepain/libv8-5.7
196188
$SUDO_CMD apt-get update
197189
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu55 libv8-5.7-dev
198190
fi
191+
192+
# V8 5.8
193+
if [ $INSTALL_V8REPO58 = 1 ]; then
194+
$SUDO_CMD sh -c "echo \"deb http://ppa.launchpad.net/pinepain/libv8-archived/ubuntu trusty main\" > /etc/apt/sources.list.d/libv8-archived.list"
195+
$SUDO_CMD apt-get update
196+
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install libicu57 libv8-5.8.283 libv8-5.8-dev
197+
fi
199198
}
200199

201200
# V8

0 commit comments

Comments
 (0)