Skip to content

Commit

Permalink
lttoolbox -= deps; lttoolbox vcpkg (issue #5); Combined m4 version de…
Browse files Browse the repository at this point in the history
…tection
  • Loading branch information
TinoDidriksen committed May 7, 2020
1 parent 8544b65 commit d95c345
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
6 changes: 5 additions & 1 deletion get-version.pl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ BEGIN
my $data = file_get_contents($opts{file});
my $version = '';
if ($data =~ m@_VERSION_MAJOR = (\d+);.*?_VERSION_MINOR = (\d+);.*?_VERSION_PATCH = (\d+);@s) {
if ($data =~ m@_VERSION_MAJOR\], \[(\d+)\].*?_VERSION_MINOR\], \[(\d+)\].*?_VERSION_PATCH\], \[(\d+)\]@s) {
print STDERR "Found m4 _VERSION_MAJOR/MINOR/PATCH version\n";
$version = "$1.$2.$3";
}
elsif ($data =~ m@_VERSION_MAJOR = (\d+);.*?_VERSION_MINOR = (\d+);.*?_VERSION_PATCH = (\d+);@s) {
print STDERR "Found _VERSION_MAJOR/MINOR/PATCH version\n";
$version = "$1.$2.$3";
}
Expand Down
7 changes: 1 addition & 6 deletions tools/lttoolbox/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ Build-Depends: automake,
dh-autoreconf,
dh-exec,
dh-python,
flex,
gawk,
libpcre3-dev,
libtool,
libxml2-dev,
libxml2-utils,
pkg-config,
python3-dev,
python3-setuptools,
swig,
xsltproc,
zlib1g-dev
swig
Standards-Version: 4.5.0
Homepage: https://apertium.org/
Vcs-Git: https://salsa.debian.org/science-team/lttoolbox.git
Expand Down
5 changes: 5 additions & 0 deletions tools/lttoolbox/vcpkg/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: lttoolbox
Version: 3.5.2
Homepage: https://github.com/apertium/lttoolbox
Description: Finite state compiler, processor and helper tools used by apertium.
Build-Depends: libxml2, getopt
30 changes: 30 additions & 0 deletions tools/lttoolbox/vcpkg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apertium/lttoolbox
REF 841a0e9a032438d78f5b3ee6aa298daf9f9d0838
SHA512 fdc94bad9e42427c26ecfa055df9a19135716be09716214394530e626273d2221ee14c4eb4f8d7cce6aeb01222e6e0e34531e19f0954c8f0faa5f5f85547996c
HEAD_REF master
)

vcpkg_find_acquire_program(PYTHON3)
set(VCPKG_PYTHON_EXECUTABLE "${PYTHON3}")

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lttoolbox RENAME copyright)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/lttoolbox)
file(GLOB exes RELATIVE ${CURRENT_PACKAGES_DIR}/bin/ ${CURRENT_PACKAGES_DIR}/bin/*.exe)
foreach(exe ${exes})
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${exe})
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${exe} ${CURRENT_PACKAGES_DIR}/tools/lttoolbox/${exe})
endforeach()

0 comments on commit d95c345

Please sign in to comment.