mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Modernize build, remove libdir patches, fix workflows — leptonica: 1.86.0 → 1.87.0-pre1 (#13591)
* Modernize build, try removing patches for libdir. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Use fixed workflow. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust to prerelease to get libdir fix. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust build workflow to use same changed files logic as in Generate PR workflow. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Pull in head sha determination changes from Build workflow. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * fix_leptonica: Package File Update Run on linux/amd64 container. * fix_leptonica: Package File Update Run on linux/arm/v7 container. --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: chromebrew-actions[bot] <220035932+chromebrew-actions[bot]@users.noreply.github.com> Co-authored-by: satmandu <satmandu@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
38652e1fa4
commit
2b275bde82
18
.github/workflows/Build.yml
vendored
18
.github/workflows/Build.yml
vendored
@@ -77,6 +77,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
timestamp: ${{ steps.set-timestamp.outputs.TIMESTAMP }} # https://stackoverflow.com/a/75142892
|
||||
current_head: ${{ steps.get-current-head.outputs.CURRENT_HEAD }}
|
||||
changed_packages: ${{ steps.changed-packages.outputs.CHANGED_PACKAGES }}
|
||||
glibc_232_compat: ${{ steps.get-compatibility.outputs.GLIBC_232_COMPATIBLE_PACKAGES }}
|
||||
glibc_237_compat: ${{ steps.get-compatibility.outputs.GLIBC_237_COMPATIBLE_PACKAGES }}
|
||||
@@ -85,6 +86,12 @@ jobs:
|
||||
armv7l_packages: ${{ steps.get-compatibility.outputs.armv7l_PACKAGES }}
|
||||
matrix: ${{ steps.set-generate-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Set Timestamp
|
||||
id: set-timestamp
|
||||
run: |
|
||||
TIMESTAMP="$(date -u +%F-%H%Z)"
|
||||
export TIMESTAMP
|
||||
echo "TIMESTAMP=${TIMESTAMP}" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@@ -103,17 +110,16 @@ jobs:
|
||||
# exists.
|
||||
[[ "${{ ( inputs.update_rebase_to_master ) }}" == 'true' ]] && gh pr update-branch --rebase || true
|
||||
fi
|
||||
- name: Set Timestamp
|
||||
id: set-timestamp
|
||||
- name: Get Current HEAD hash
|
||||
id: get-current-head
|
||||
run: |
|
||||
TIMESTAMP="$(date -u +%F-%H%Z)"
|
||||
export TIMESTAMP
|
||||
echo "TIMESTAMP=${TIMESTAMP}" >> "$GITHUB_OUTPUT"
|
||||
echo "CURRENT_HEAD=$(git ls-remote https://github.com/${{ github.repository }}.git | head -1 | sed 's/HEAD//')" >> "$GITHUB_OUTPUT"
|
||||
echo "CURRENT_HEAD is $(git ls-remote https://github.com/${{ github.repository }}.git | head -1 | sed 's/HEAD//')"
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
base_sha: master
|
||||
base_sha: ${{ steps.get-current-head.outputs.CURRENT_HEAD }}
|
||||
files_yaml: |
|
||||
packages:
|
||||
- packages/*.rb
|
||||
|
||||
8
.github/workflows/Generate-PR.yml
vendored
8
.github/workflows/Generate-PR.yml
vendored
@@ -57,6 +57,7 @@ jobs:
|
||||
if: ${{ ( github.repository_owner == 'chromebrew' ) && ( inputs.branch != 'master' ) }}
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
current_head: ${{ steps.get-current-head.outputs.CURRENT_HEAD }}
|
||||
changed_packages: ${{ steps.changed-packages.outputs.CHANGED_PACKAGES }}
|
||||
glibc_232_compat: ${{ steps.get-compatibility.outputs.GLIBC_232_COMPATIBLE_PACKAGES }}
|
||||
glibc_237_compat: ${{ steps.get-compatibility.outputs.GLIBC_237_COMPATIBLE_PACKAGES }}
|
||||
@@ -89,11 +90,16 @@ jobs:
|
||||
# before continuing.
|
||||
gh pr update-branch || true
|
||||
fi
|
||||
- name: Get Current HEAD hash
|
||||
id: get-current-head
|
||||
run: |
|
||||
echo "CURRENT_HEAD=$(git ls-remote https://github.com/${{ github.repository }}.git | head -1 | sed 's/HEAD//')" >> "$GITHUB_OUTPUT"
|
||||
echo "CURRENT_HEAD is $(git ls-remote https://github.com/${{ github.repository }}.git | head -1 | sed 's/HEAD//')"
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
base_sha: master
|
||||
base_sha: ${{ steps.get-current-head.outputs.CURRENT_HEAD }}
|
||||
files_yaml: |
|
||||
packages:
|
||||
- packages/*.rb
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Total size: 2845559
|
||||
# Total size: 2845570
|
||||
/usr/local/include/leptonica/allheaders.h
|
||||
/usr/local/include/leptonica/alltypes.h
|
||||
/usr/local/include/leptonica/array.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Total size: 3623017
|
||||
# Total size: 3623030
|
||||
/usr/local/include/leptonica/allheaders.h
|
||||
/usr/local/include/leptonica/alltypes.h
|
||||
/usr/local/include/leptonica/array.h
|
||||
@@ -35,11 +35,11 @@
|
||||
/usr/local/include/leptonica/stringcode.h
|
||||
/usr/local/include/leptonica/sudoku.h
|
||||
/usr/local/include/leptonica/watershed.h
|
||||
/usr/local/lib/libleptonica.so
|
||||
/usr/local/lib/libleptonica.so.6
|
||||
/usr/local/lib/libleptonica.so.6.0.0
|
||||
/usr/local/lib64/cmake/leptonica/LeptonicaConfig-version.cmake
|
||||
/usr/local/lib64/cmake/leptonica/LeptonicaConfig.cmake
|
||||
/usr/local/lib64/cmake/leptonica/LeptonicaTargets-release.cmake
|
||||
/usr/local/lib64/cmake/leptonica/LeptonicaTargets.cmake
|
||||
/usr/local/lib64/libleptonica.so
|
||||
/usr/local/lib64/libleptonica.so.6
|
||||
/usr/local/lib64/libleptonica.so.6.0.0
|
||||
/usr/local/lib64/pkgconfig/lept.pc
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
require 'package'
|
||||
require 'buildsystems/cmake'
|
||||
|
||||
class Leptonica < Package
|
||||
class Leptonica < CMake
|
||||
description 'Software that is broadly useful for image processing and image analysis applications'
|
||||
homepage 'http://www.leptonica.org'
|
||||
version '1.86.0'
|
||||
version '1.87.0-pre1'
|
||||
license 'Apache-2.0'
|
||||
compatibility 'aarch64 armv7l x86_64'
|
||||
source_url 'https://github.com/DanBloomberg/leptonica.git'
|
||||
@@ -11,9 +11,9 @@ class Leptonica < Package
|
||||
binary_compression 'tar.zst'
|
||||
|
||||
binary_sha256({
|
||||
aarch64: '9293c5934af118d2ab4282ad14871d4b3113da58df5f207b3761a3cffddf4cea',
|
||||
armv7l: '9293c5934af118d2ab4282ad14871d4b3113da58df5f207b3761a3cffddf4cea',
|
||||
x86_64: '8aec7395faa2f5de04c495fd9a96d7874b97ee6221b726bd715f2fb172f53b9d'
|
||||
aarch64: 'ce467a8ce915951e6a579ef134bb92c9ed82e5b7000db9c65a81cfa2b3ec27cd',
|
||||
armv7l: 'ce467a8ce915951e6a579ef134bb92c9ed82e5b7000db9c65a81cfa2b3ec27cd',
|
||||
x86_64: '77166ed2e0b882ccabe95844007027a4907dce27bbcc67fb17b4107d6cae62c4'
|
||||
})
|
||||
|
||||
depends_on 'giflib' # R
|
||||
@@ -29,24 +29,5 @@ class Leptonica < Package
|
||||
depends_on 'zlib' # R
|
||||
depends_on 'zstd' => :build
|
||||
|
||||
def self.patch
|
||||
# See https://github.com/DanBloomberg/leptonica/issues/693
|
||||
system "sed -i 's,lib/cmake/leptonica,#{ARCH_LIB}/cmake/leptonica,g' CMakeLists.txt"
|
||||
system "sed -i 's,lib/pkgconfig,#{ARCH_LIB}/pkgconfig,g' CMakeLists.txt"
|
||||
system "sed -i 's,prefix}/lib,prefix}/#{ARCH_LIB},g' lept.pc.cmake"
|
||||
system "sed -i 's,set(lib,set(#{ARCH_LIB},g' src/CMakeLists.txt"
|
||||
system "sed -i 's,DESTINATION lib ARCHIVE DESTINATION lib,DESTINATION #{ARCH_LIB} ARCHIVE DESTINATION #{ARCH_LIB},g' src/CMakeLists.txt"
|
||||
end
|
||||
|
||||
def self.build
|
||||
system "cmake -B builddir #{CREW_CMAKE_OPTIONS} \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-Wno-dev \
|
||||
-G Ninja"
|
||||
system "#{CREW_NINJA} -C builddir"
|
||||
end
|
||||
|
||||
def self.install
|
||||
system "DESTDIR=#{CREW_DEST_DIR} #{CREW_NINJA} -C builddir install"
|
||||
end
|
||||
cmake_options '-DBUILD_SHARED_LIBS=ON'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user