Skip to content

Commit

Permalink
Remove cld2 sources and libraries from repository
Browse files Browse the repository at this point in the history
  • Loading branch information
DeinAlptraum committed Aug 24, 2024
1 parent c1aa8f2 commit abe3e91
Show file tree
Hide file tree
Showing 91 changed files with 54 additions and 905,203 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: compnerd/gha-setup-vsdevenv@main
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
Expand Down Expand Up @@ -50,13 +52,12 @@ jobs:
msbuild build/install.vcxproj -p:Configuration=Release
- name: Install cld2
run: |
git clone https://github.com/CLD2Owners/cld2.git
cd cld2/internal
cd include/cld2/internal
cl /TP /GR /EHsc /c /MD cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc compact_lang_det_impl.cc debug.cc fixunicodevalue.cc generated_entities.cc generated_language.cc generated_ulscript.cc getonescriptspan.cc lang_script.cc offsetmap.cc scoreonescriptspan.cc tote.cc utf8statetable.cc cld_generated_cjk_uni_prop_80.cc cld2_generated_cjk_compatible.cc cld_generated_cjk_delta_bi_32.cc generated_distinct_bi_0.cc cld2_generated_quad0122.cc cld2_generated_deltaocta0122.cc cld2_generated_distinctocta0122.cc cld_generated_score_quad_octa_0122.cc
link /dll /out:cld2.dll *.obj
lib /out:cld2.lib *.obj
copy cld2.lib ../../lib/win64
copy cld2.dll ../../lib/win64
copy cld2.lib ../../../lib/win64
copy cld2.dll ../../../lib/win64
- name: Build plugins
run: |
cd src/plugins/audiotag/
Expand Down Expand Up @@ -109,13 +110,25 @@ jobs:
id: cpu-cores
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: |
brew unlink [email protected] && brew link --overwrite [email protected]
brew install qt
brew install taglib
brew install libmediainfo
brew install create-dmg
- name: Install cld2
run: |
ls lib
cd include
patch cld2/internal/compile_libs.sh cld2-mac-compile.patch
cd cld2/internal/
export CFLAGS="-Wno-narrowing -O3"
./compile_libs.sh
ls ../..
cp libcld2.dylib ../../lib/MacOS
- name: Build plugins
run: |
cd src/plugins/audiotag/
Expand Down Expand Up @@ -163,6 +176,8 @@ jobs:
id: cpu-cores
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "include/cld2"]
path = include/cld2
url = https://github.com/CLD2Owners/cld2.git
1 change: 1 addition & 0 deletions include/cld2
Submodule cld2 added at b56fa7
31 changes: 31 additions & 0 deletions include/cld2-mac-compile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/internal/compile_libs.sh b/internal/compile_libs.sh
index 38c6655..49a6a7e 100755
--- a/internal/compile_libs.sh
+++ b/internal/compile_libs.sh
@@ -27,7 +27,7 @@ if [ -n "${CPPFLAGS}" ]; then
echo "CPPFLAGS=${CPPFLAGS}"
fi

-g++ $CFLAGS $CPPFLAGS $CXXFLAGS -shared -fPIC \
+g++ $CFLAGS $CPPFLAGS $CXXFLAGS -dynamiclib -fPIC \
cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc \
compact_lang_det_impl.cc debug.cc fixunicodevalue.cc \
generated_entities.cc generated_language.cc generated_ulscript.cc \
@@ -37,17 +37,5 @@ g++ $CFLAGS $CPPFLAGS $CXXFLAGS -shared -fPIC \
cld_generated_cjk_delta_bi_4.cc generated_distinct_bi_0.cc \
cld2_generated_quadchrome_2.cc cld2_generated_deltaoctachrome.cc \
cld2_generated_distinctoctachrome.cc cld_generated_score_quad_octa_2.cc \
- -o libcld2.so $LDFLAGS -Wl,-soname=libcld2.so
-
-g++ $CFLAGS $CPPFLAGS $CXXFLAGS -shared -fPIC \
- cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc \
- compact_lang_det_impl.cc debug.cc fixunicodevalue.cc \
- generated_entities.cc generated_language.cc generated_ulscript.cc \
- getonescriptspan.cc lang_script.cc offsetmap.cc scoreonescriptspan.cc \
- tote.cc utf8statetable.cc \
- cld_generated_cjk_uni_prop_80.cc cld2_generated_cjk_compatible.cc \
- cld_generated_cjk_delta_bi_32.cc generated_distinct_bi_0.cc \
- cld2_generated_quad0122.cc cld2_generated_deltaocta0122.cc \
- cld2_generated_distinctocta0122.cc cld_generated_score_quad_octa_0122.cc \
- -o libcld2_full.so $LDFLAGS -Wl,-soname=libcld2_full.so
+ -o libcld2.dylib $LDFLAGS -Wl,-install_name,libcld2.dylib
277 changes: 0 additions & 277 deletions include/cld2/internal/cld2_do_score.cc

This file was deleted.

Loading

0 comments on commit abe3e91

Please sign in to comment.