diff --git a/.drone.star b/.drone.star deleted file mode 100644 index ce8ac5c4..00000000 --- a/.drone.star +++ /dev/null @@ -1,216 +0,0 @@ -#-------------------------------------------------------------------------- -# Constants -#-------------------------------------------------------------------------- - -# List of triplets to build -triplets = [ - 'x64-windows-webkit', - 'x86-windows-webkit', -] - -#-------------------------------------------------------------------------- -# Build config -#-------------------------------------------------------------------------- - -def build_config(triplet): - suffix = '64' if triplet.startswith('x64') else '32' - - return { - 'triplet': triplet, - 'build-image': 'webkitdev/msbuild', - 'ports': [ - # This should be kept in sync with WindowsRequirements.json - "zlib", - "brotli", - "libressl[tools]", - "nghttp2", - "ngtcp2[libressl]", - "nghttp3", - "curl[libressl,http3,ipv6]", - "icu", - "libxml2[xslt]", - "libxslt", - "lcms", - "highway", - "libpng", - "libjpeg-turbo", - "libwebp", - "openjpeg", - "libjxl", - "sqlite3", - "woff2", - "pixman", - "cairo", - "libpsl", - # Additional ports - 'pthreads', - 'cflite', - ], - 'distribution': 'WebKitRequirementsWin' + suffix + '.zip', - 'volumes': [], - 'environment': {}, - } - -#-------------------------------------------------------------------------- -# Steps -#-------------------------------------------------------------------------- - -def build_vcpkg(config): - return { - 'name': 'vcpkg', - 'image': config['build-image'], - 'pull': 'always', - 'commands': ['./Install-Vcpkg.ps1 -VcpkgPath C:/vcpkg'], - } - -def download_vcpkg_tools(config): - return { - 'name': 'download-vcpkg-tools', - 'image': config['build-image'], - 'commands': ['./Download-VcpkgTools.ps1 -ToolsPath ./scripts/vcpkgTools.xml'], - } - -def build_port(port, config): - triplet = config['triplet'] - build_image = config['build-image'] - # Don't include any feature defines (e.g [foo]) - port_name = port.split('[')[0] - - return { - 'name': port_name, - 'image': build_image, - 'commands': ['./vcpkg.exe install {} --triplet {}'.format(port, triplet)], - 'volumes': config['volumes'], - 'environment': config['environment'], - 'steps': _build_output(port_name, triplet, build_image), - } - -def _build_output(port, triplet, build_image, step_name=''): - # These steps should always run to capture config and compilation errors - when_clause = {'status': ['success', 'failure']} - if not step_name: - step_name = port - - return [ - { - 'name': step_name + '-config', - 'image': build_image, - 'commands': ['Get-Content ./buildtrees/{}/config-{}-out.log'.format(port, triplet)], - 'when': when_clause, - }, - { - 'name': step_name + '-debug-build', - 'image': build_image, - 'commands': ['Get-Content ./buildtrees/{}/install-{}-dbg-out.log'.format(port, triplet)], - 'when': when_clause, - }, - { - 'name': step_name + '-release-build', - 'image': build_image, - 'commands': ['Get-Content ./buildtrees/{}/install-{}-rel-out.log'.format(port, triplet)], - 'when': when_clause, - }, - ] - -def bundle_requirements(config): - return { - 'name': 'bundle', - 'image': config['build-image'], - 'commands': ['./Release-Requirements.ps1 -Triplet {}'.format(config['triplet'])], - } - -def release_requirements(config): - return { - 'name': 'release', - 'image': 'plugins/github-release', - 'pull': 'always', - 'settings': { - 'api_key': {'from_secret': 'github_token'}, - 'files': [config['distribution']], - # Currently the release is manual - 'prerelease': True, - }, - 'when': { - 'event': ['tag'], - }, - } - -#-------------------------------------------------------------------------- -# Pipelines -#-------------------------------------------------------------------------- - -def build_pipeline(triplet): - config = build_config(triplet) - - # Add initial steps - build_steps = [ - build_vcpkg(config), - download_vcpkg_tools(config), - ] - - for port in config['ports']: - build_steps.append(build_port(port, config)) - - # Add packaging steps - build_steps.append(bundle_requirements(config)) - build_steps.append(release_requirements(config)) - - prev_step = 'clone' - steps = [] - - for step in build_steps: - step['depends_on'] = [prev_step] - steps.append(step) - prev_step = step['name'] - - # See if there are additional sub steps - if 'steps' in step: - sub_steps = step.pop('steps') - - for sub_step in sub_steps: - sub_step['depends_on'] = [prev_step] - steps.append(sub_step) - - # Remove the depends_on for the first step to make sure a drone exec works - # when there is no clone step - steps[0].pop('depends_on') - - # Create volumes - volumes = [] - for volume in config['volumes']: - volume = { - 'name': volume['name'], - 'temp': {}, - } - - volumes.append(volume) - - # Create pipeline - current = _windows_pipeline(windows_version) - current['name'] = 'Build {}'.format(triplet) - current['steps'] = steps - current['volumes'] = volumes - - return current - -def _windows_pipeline(): - return { - 'kind': 'pipeline', - 'type': 'docker', - 'platform': { - 'os': 'windows', - 'arch': 'amd64' - } - } - -#-------------------------------------------------------------------------- -# Main -#-------------------------------------------------------------------------- - -def main(ctx): - definitions = [] - - for triplet in triplets: - definitions.append(build_pipeline(triplet)) - - return definitions diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 5378fe08..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* -text \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..5c4fffd0 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,487 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + build-requirements: + name: Build WebKit Requirements + runs-on: windows-latest + + strategy: + matrix: + triplet: [x64-windows-webkit] + + steps: + - uses: actions/checkout@v4 + with: + repository: microsoft/vcpkg + - uses: actions/checkout@v4 + with: + path: WebKitRequirements + + # Download the latest vcpkg locally + - name: Install vcpkg + run: ./scripts/bootstrap.ps1 -disableMetrics + - name: Version information of vcpkg + id: vcpkg + run: ./vcpkg.exe version + + # Build the individual ports + # + # The ordering corresponds to `WindowsRequirements.json`. Build of a port + # is conditional on its dependencies + - name: Build zlib + id: zlib + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install zlib --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read zlib config + if: steps.zlib.outcome == 'success' || steps.zlib.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/zlib-ng/config-${{ matrix.triplet }}-out.log + - name: Read zlib debug build log + if: steps.zlib.outcome == 'success' || steps.zlib.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/zlib-ng/install-${{ matrix.triplet }}-dbg-out.log + - name: Read zlib release build log + if: steps.zlib.outcome == 'success' || steps.zlib.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/zlib-ng/install-${{ matrix.triplet }}-rel-out.log + + - name: Build brotli + id: brotli + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install brotli --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read brotli config + if: steps.brotli.outcome == 'success' || steps.brotli.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/brotli/config-${{ matrix.triplet }}-out.log + - name: Read brotli debug build log + if: steps.brotli.outcome == 'success' || steps.brotli.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/brotli/install-${{ matrix.triplet }}-dbg-out.log + - name: Read brotli release build log + if: steps.brotli.outcome == 'success' || steps.brotli.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/brotli/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libressl + id: libressl + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libressl[tools] --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libressl config + if: steps.libressl.outcome == 'success' || steps.libressl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libressl/config-${{ matrix.triplet }}-out.log + - name: Read libressl debug build log + if: steps.libressl.outcome == 'success' || steps.libressl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libressl/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libressl release build log + if: steps.libressl.outcome == 'success' || steps.libressl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libressl/install-${{ matrix.triplet }}-rel-out.log + + - name: Build nghttp2 + id: nghttp2 + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install nghttp2 --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read nghttp2 config + if: steps.nghttp2.outcome == 'success' || steps.nghttp2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/nghttp2/config-${{ matrix.triplet }}-out.log + - name: Read nghttp2 debug build log + if: steps.nghttp2.outcome == 'success' || steps.nghttp2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/nghttp2/install-${{ matrix.triplet }}-dbg-out.log + - name: Read nghttp2 release build log + if: steps.nghttp2.outcome == 'success' || steps.nghttp2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/nghttp2/install-${{ matrix.triplet }}-rel-out.log + + - name: Build ngtcp2 + id: ngtcp2 + if: steps.libressl.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install ngtcp2[openssl] --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read ngtcp2 config + if: steps.ngtcp2.outcome == 'success' || steps.ngtcp2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/ngtcp2/config-${{ matrix.triplet }}-out.log + - name: Read ngtcp2 debug build log + if: steps.ngtcp2.outcome == 'success' || steps.ngtcp2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/ngtcp2/install-${{ matrix.triplet }}-dbg-out.log + - name: Read ngtcp2 release build log + if: steps.ngtcp2.outcome == 'success' || steps.ngtcp2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/ngtcp2/install-${{ matrix.triplet }}-rel-out.log + + - name: Build nghttp3 + id: nghttp3 + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install nghttp3 --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read nghttp3 config + if: steps.nghttp3.outcome == 'success' || steps.nghttp3.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/nghttp3/config-${{ matrix.triplet }}-out.log + - name: Read nghttp3 debug build log + if: steps.nghttp3.outcome == 'success' || steps.nghttp3.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/nghttp3/install-${{ matrix.triplet }}-dbg-out.log + - name: Read nghttp3 release build log + if: steps.nghttp3.outcome == 'success' || steps.nghttp3.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/nghttp3/install-${{ matrix.triplet }}-rel-out.log + + - name: Build curl + id: curl + if: | + steps.brotli.outcome == 'success' && + steps.nghttp2.outcome == 'success' && + steps.zlib.outcome == 'success' && + steps.libressl.outcome == 'success' && + steps.ngtcp2.outcome == 'success' && + steps.nghttp3.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install curl[libressl,http3,ipv6] --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read curl config + if: steps.curl.outcome == 'success' || steps.curl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/curl/config-${{ matrix.triplet }}-out.log + - name: Read curl debug build log + if: steps.curl.outcome == 'success' || steps.curl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/curl/install-${{ matrix.triplet }}-dbg-out.log + - name: Read curl release build log + if: steps.curl.outcome == 'success' || steps.curl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/curl/install-${{ matrix.triplet }}-rel-out.log + + - name: Build icu + id: icu + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install icu --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read icu config + if: steps.icu.outcome == 'success' || steps.icu.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/icu/config-${{ matrix.triplet }}-out.log + - name: Read icu debug build log + if: steps.icu.outcome == 'success' || steps.icu.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/icu/install-${{ matrix.triplet }}-dbg-out.log + - name: Read icu release build log + if: steps.icu.outcome == 'success' || steps.icu.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/icu/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libxml2 + id: libxml2 + if: steps.icu.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libxml2[core,icu] --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libxml2 config + if: steps.libxml2.outcome == 'success' || steps.libxml2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libxml2/config-${{ matrix.triplet }}-out.log + - name: Read libxml2 debug build log + if: steps.libxml2.outcome == 'success' || steps.libxml2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libxml2/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libxml2 release build log + if: steps.libxml2.outcome == 'success' || steps.libxml2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libxml2/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libxslt + id: libxslt + if: steps.libxml2.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libxslt --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libxslt config + if: steps.libxslt.outcome == 'success' || steps.libxslt.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libxslt/config-${{ matrix.triplet }}-out.log + - name: Read libxslt debug build log + if: steps.libxslt.outcome == 'success' || steps.libxslt.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libxslt/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libxslt release build log + if: steps.libxslt.outcome == 'success' || steps.libxslt.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libxslt/install-${{ matrix.triplet }}-rel-out.log + + - name: Build lcms + id: lcms + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install lcms --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read lcms debug config + if: steps.lcms.outcome == 'success' || steps.lcms.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/lcms/config-${{ matrix.triplet }}-dbg-out.log + - name: Read lcms debug build log + if: steps.lcms.outcome == 'success' || steps.lcms.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/lcms/package-${{ matrix.triplet }}-dbg-out.log + - name: Read lcms release config + if: steps.lcms.outcome == 'success' || steps.lcms.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/lcms/config-${{ matrix.triplet }}-rel-out.log + - name: Read lcms release build log + if: steps.lcms.outcome == 'success' || steps.lcms.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/lcms/package-${{ matrix.triplet }}-rel-out.log + + - name: Build highway + id: highway + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install highway --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read highway config + if: steps.highway.outcome == 'success' || steps.highway.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/highway/config-${{ matrix.triplet }}-out.log + - name: Read highway debug build log + if: steps.highway.outcome == 'success' || steps.highway.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/highway/install-${{ matrix.triplet }}-dbg-out.log + - name: Read highway release build log + if: steps.highway.outcome == 'success' || steps.highway.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/highway/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libpng + id: libpng + if: steps.zlib.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libpng --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libpng config + if: steps.libpng.outcome == 'success' || steps.libpng.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpng/config-${{ matrix.triplet }}-out.log + - name: Read libpng debug build log + if: steps.libpng.outcome == 'success' || steps.libpng.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpng/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libpng release build log + if: steps.libpng.outcome == 'success' || steps.libpng.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpng/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libjpeg-turbo + id: libjpeg + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libjpeg-turbo --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libjpeg-turbo config + if: steps.libjpeg.outcome == 'success' || steps.libjpeg.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libjpeg-turbo/config-${{ matrix.triplet }}-out.log + - name: Read libjpeg-turbo debug build log + if: steps.libjpeg.outcome == 'success' || steps.libjpeg.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libjpeg-turbo/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libjpeg-turbo release build log + if: steps.libjpeg.outcome == 'success' || steps.libjpeg.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libjpeg-turbo/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libwebp + id: libwebp + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libwebp --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libwebp config + if: steps.libwebp.outcome == 'success' || steps.libwebp.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libwebp/config-${{ matrix.triplet }}-out.log + - name: Read libwebp debug build log + if: steps.libwebp.outcome == 'success' || steps.libwebp.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libwebp/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libwebp release build log + if: steps.libwebp.outcome == 'success' || steps.libwebp.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libwebp/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libjxl + id: libjxl + if: | + steps.brotli.outcome == 'success' && + steps.highway.outcome == 'success' && + steps.lcms.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libjxl --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libjxl config + if: steps.libjxl.outcome == 'success' || steps.libjxl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libjxl/config-${{ matrix.triplet }}-out.log + - name: Read libjxl debug build log + if: steps.libjxl.outcome == 'success' || steps.libjxl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libjxl/install-${{ matrix.triplet }}-dbg-out.log + - name: Read libjxl release build log + if: steps.libjxl.outcome == 'success' || steps.libjxl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libjxl/install-${{ matrix.triplet }}-rel-out.log + + - name: Build sqlite3 + id: sqlite3 + if: steps.vcpkg.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install sqlite3[json1,fts3,rtree] --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read sqlite3 config + if: steps.sqlite3.outcome == 'success' || steps.sqlite3.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/sqlite3/config-${{ matrix.triplet }}-out.log + - name: Read sqlite3 debug build log + if: steps.sqlite3.outcome == 'success' || steps.sqlite3.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/sqlite3/install-${{ matrix.triplet }}-dbg-out.log + - name: Read sqlite3 release build log + if: steps.sqlite3.outcome == 'success' || steps.sqlite3.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/sqlite3/install-${{ matrix.triplet }}-rel-out.log + + - name: Build woff2 + id: woff2 + if: steps.brotli.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install woff2 --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read woff2 config + if: steps.woff2.outcome == 'success' || steps.woff2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/woff2/config-${{ matrix.triplet }}-out.log + - name: Read woff2 debug build log + if: steps.woff2.outcome == 'success' || steps.woff2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/woff2/install-${{ matrix.triplet }}-dbg-out.log + - name: Read woff2 release build log + if: steps.woff2.outcome == 'success' || steps.woff2.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/woff2/install-${{ matrix.triplet }}-rel-out.log + + - name: Build harfbuzz + id: harfbuzz + if: steps.icu.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install harfbuzz[core,icu,directwrite] --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read harfbuzz debug config + if: steps.harfbuzz.outcome == 'success' || steps.harfbuzz.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/harfbuzz/config-${{ matrix.triplet }}-dbg-out.log + - name: Read harfbuzz debug build log + if: steps.harfbuzz.outcome == 'success' || steps.harfbuzz.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/harfbuzz/package-${{ matrix.triplet }}-dbg-out.log + - name: Read harfbuzz release config + if: steps.harfbuzz.outcome == 'success' || steps.harfbuzz.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/harfbuzz/config-${{ matrix.triplet }}-rel-out.log + - name: Read harfbuzz release build log + if: steps.harfbuzz.outcome == 'success' || steps.harfbuzz.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/harfbuzz/package-${{ matrix.triplet }}-rel-out.log + + - name: Build pixman + id: pixman + if: steps.icu.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install pixman --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read pixman debug config + if: steps.pixman.outcome == 'success' || steps.pixman.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/pixman/config-${{ matrix.triplet }}-dbg-out.log + - name: Read pixman debug build log + if: steps.pixman.outcome == 'success' || steps.pixman.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/pixman/package-${{ matrix.triplet }}-dbg-out.log + - name: Read pixman release config + if: steps.pixman.outcome == 'success' || steps.pixman.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/pixman/config-${{ matrix.triplet }}-rel-out.log + - name: Read pixman release build log + if: steps.pixman.outcome == 'success' || steps.pixman.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/pixman/package-${{ matrix.triplet }}-rel-out.log + + - name: Build cairo + id: cairo + if: steps.libpng.outcome == 'success' && steps.pixman.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install cairo --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read cairo config + if: steps.cairo.outcome == 'success' || steps.cairo.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/cairo/config-${{ matrix.triplet }}-out.log + - name: Read cairo debug build log + if: steps.cairo.outcome == 'success' || steps.cairo.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/cairo/install-${{ matrix.triplet }}-dbg-out.log + - name: Read cairo release build log + if: steps.cairo.outcome == 'success' || steps.cairo.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/cairo/install-${{ matrix.triplet }}-rel-out.log + + - name: Build libpsl + id: libpsl + if: steps.icu.outcome == 'success' + continue-on-error: true + run: ./vcpkg.exe install libpsl --overlay-ports ./WebKitRequirements/ports --overlay-triplets ./WebKitRequirements/triplets --triplet ${{ matrix.triplet }} + - name: Read libpsl debug config + if: steps.libpsl.outcome == 'success' || steps.libpsl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpsl/config-${{ matrix.triplet }}-dbg-out.log + - name: Read libpsl debug build log + if: steps.libpsl.outcome == 'success' || steps.libpsl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpsl/package-${{ matrix.triplet }}-dbg-out.log + - name: Read libpsl release config + if: steps.libpsl.outcome == 'success' || steps.libpsl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpsl/config-${{ matrix.triplet }}-rel-out.log + - name: Read libpsl release build log + if: steps.libpsl.outcome == 'success' || steps.libpsl.outcome == 'failure' + continue-on-error: true + run: Get-Content ./buildtrees/libpsl/package-${{ matrix.triplet }}-rel-out.log + + # See if any of the previous build steps had an outcome of `failure` + # + # Each step sets `continue-on-error` so there needs to be a check + # otherwise the pipeline will be successful + - name: Build verification + if: | + steps.zlib.outcome == 'failure' || + steps.brotli.outcome == 'failure' || + steps.libressl.outcome == 'failure' || + steps.nghttp2.outcome == 'failure' || + steps.ngtcp2.outcome == 'failure' || + steps.nghttp3.outcome == 'failure' || + steps.curl.outcome == 'failure' || + steps.icu.outcome == 'failure' || + steps.libxml2.outcome == 'failure' || + steps.libxslt.outcome == 'failure' || + steps.lcms.outcome == 'failure' || + steps.highway.outcome == 'failure' || + steps.libpng.outcome == 'failure' || + steps.libjpeg.outcome == 'failure' || + steps.libwebp.outcome == 'failure' || + steps.libjxl.outcome == 'failure' || + steps.sqlite3.outcome == 'failure' || + steps.woff2.outcome == 'failure' || + steps.pixman.outcome == 'failure' || + steps.cairo.outcome == 'failure' || + steps.libpsl.outcome == 'failure' + run: exit 1 diff --git a/.github/workflows/reqcheck.yml b/.github/workflows/reqcheck.yml new file mode 100644 index 00000000..06f8f5e0 --- /dev/null +++ b/.github/workflows/reqcheck.yml @@ -0,0 +1,67 @@ +name: Check requirements + +on: + # Run every monday at noon + schedule: + - cron: 0 12 * * 1 + workflow_dispatch: + +jobs: + reqcheck: + name: Check for new requirements versions + runs-on: ubuntu-latest + + steps: + # Get the Git SHA used in WebKit + - name: Determine vcpkg sha + uses: actions/github-script@v8 + id: get-sha + with: + result-encoding: string + script: | + const res = await fetch('https://raw.githubusercontent.com/WebKit/WebKit/refs/heads/main/vcpkg-configuration.json'); + if (res.ok) { + const data = await res.json(); + return data['default-registry']['baseline']; + } + return ''; + + - uses: actions/checkout@v4 + with: + repository: microsoft/vcpkg + ref: ${{ steps.get-sha.outputs.result }} + - uses: actions/checkout@v4 + with: + path: WebKitRequirements + + # Download reqcheck locally + - name: Download reqcheck + uses: robinraju/release-downloader@v1 + with: + repository: WebKitForWindows/reqcheck + latest: true + fileName: reqcheck_linux_amd64.tar.gz + - name: Unzip reqcheck + run: tar -zxvf reqcheck_linux_amd64.tar.gz + - name: Verify reqcheck + run: ./reqcheck --help + - name: Add config + run: cp WebKitRequirements/.reqcheck.yml .reqcheck.yml + + # Run the command + - name: Run reqcheck + run: ./reqcheck vcpkg --slack --output-file results.json --overlay WebKitRequirements . + env: + github_public_token: ${{ secrets.GITHUB_TOKEN }} + gitlab_freedesktop_token: ${{ secrets.GITLAB_FREEDESKTOP_TOKEN }} + + # Notify the results to WebKit slack + - name: Forward a saved message + uses: slackapi/slack-github-action@v2 + with: + payload-file-path: results.json + payload-templated: true + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + env: + SLACK_CHANNEL_ID: windows diff --git a/.gitignore b/.gitignore index 30e3355a..5065bf6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ -# drone exec files -.env -.secrets -.drone.yml - # Ignore vcpkg paths /buildtrees/ /build*/ @@ -10,20 +5,5 @@ /installed*/ /packages/ -# Ignore vcpkg files -# TODO Remove once third party repositories are supported -.vcpkg-root -/scripts/* -vcpkg.exe - -# Ignore vpckg ports -/ports/vcpkg-* -!/ports/vcpkg-cmake-webkit - -# Ignore community triplets -/triplets/* -!/triplets/x64-windows-webkit.cmake -!/triplets/x86-windows-webkit.cmake - # Packaging files *.zip diff --git a/.reqcheck.yml b/.reqcheck.yml index fdfa9cdd..5a5340df 100644 --- a/.reqcheck.yml +++ b/.reqcheck.yml @@ -17,7 +17,7 @@ repos: owner: unicode-org repo: icu - zlib: + zlib-ng: host: github owner: zlib-ng repo: zlib-ng @@ -29,9 +29,8 @@ repos: libressl: host: github - owner: libressl-portable + owner: libressl repo: portable - tags: true nghttp2: host: github @@ -48,11 +47,6 @@ repos: owner: ngtcp2 repo: ngtcp2 - c-ares: - host: github - owner: c-ares - repo: c-ares - curl: host: github owner: curl diff --git a/Download-VcpkgTools.ps1 b/Download-VcpkgTools.ps1 deleted file mode 100644 index 76ad67b6..00000000 --- a/Download-VcpkgTools.ps1 +++ /dev/null @@ -1,63 +0,0 @@ -<# - .Synopsis - Downloads tools required by vcpkg. - .Details - At this time the `vcpkg` executable uses the system proxy settings, not the - values contained in the proxy environment variables. This script is a - workaround until that is resolved - .Parameter ToolsPath - The XML file containing the tool listing. -#> - -param( - [Parameter(Mandatory)] - [string]$toolsPath -) - -$ErrorActionPreference = 'Stop'; - -$downloads = @( - 'powershell-core', - '7zip' -); - -[xml]$document = Get-Content $toolsPath; -$tools = $document.SelectNodes('//tool'); - -Write-Host $document; -$downloadPath = Join-Path $PSScriptRoot 'downloads'; -$toolsPath = Join-Path $downloadPath 'tools'; - -if (!(Test-Path $downloadPath)) { - New-Item -ItemType 'directory' -Path $downloadPath; -} - -foreach ($tool in $tools) { - if ($tool.os -eq 'windows') { - foreach ($download in $downloads) { - if ($tool.Name -eq $download) { - $toolName = $tool.Name; - - # Download the tool - $downloadTo = (Join-Path $downloadPath $tool.archiveName); - - if (!(Test-Path $downloadTo)) { - Write-Host ('Downloading {0} from {1}' -f $toolName,$tool.url); - Invoke-WebFileRequest -url $tool.url -DestinationPath $downloadTo; - Write-Host ('Downloaded {0} to {1}' -f $toolName,$downloadTo); - - # Extract the tool - $extractTo = (Join-Path $toolsPath ('{0}-{1}-windows' -f $toolName,$tool.version)); - if ($toolName -eq '7zip') { - $extractTo = Join-Path $extractTo ($tool.exeRelativePath -split '\\')[0]; - } - Write-Host ('Extracting {0} from {1}' -f $toolName,$downloadTo); - Expand-7Zip -ArchiveFileName $downloadTo -TargetPath $extractTo; - Write-Host ('Extracted {0} to {1}' -f $toolName,$extractTo); - } else { - Write-Host ('Skipping download of {0}' -f $toolName) - } - } - } - } -} diff --git a/Install-Requirements.ps1 b/Install-Requirements.ps1 deleted file mode 100644 index 084a8d15..00000000 --- a/Install-Requirements.ps1 +++ /dev/null @@ -1,49 +0,0 @@ -<# - .Synopsis - Builds all the source code required for building WebKit. - .Details - Invokes vcpkg install to build all the libraries. - .Parameter Triplet - The vcpkg triplet to use. - .Parameter Libraries - Path to a JSON file containing the list of libraries. - - If the value is not provided then the script will guess at the value based on - the triplet. -#> - -param( - [Parameter(Mandatory)] - [string]$triplet, - [Parameter()] - [string]$libraries = '' -) - -$ErrorActionPreference = 'Stop'; - -if (!$libraries) { - $tripletSplit = $triplet -split '-',3; - $platform = $tripletSplit[1]; - - if ($platform -eq 'windows') { - $jsonName = 'WindowsRequirements.json'; - } else { - Write-Error ('Unknown triplet {0}' -f $libraries); - } - - $libraries = Join-Path $PSScriptRoot $jsonName; -} - -$json = Get-Content -Raw -Path $libraries | ConvertFrom-Json - -$arguments = @('install') -$arguments += $json -$arguments += '--triplet' -$arguments += $triplet - -Write-Host ('vcpkg {0}' -f ($arguments -join ' ')) - -Start-Process -Wait -NoNewWindow ` - -FilePath (Join-Path $PSScriptRoot 'vcpkg.exe') ` - -WorkingDirectory $PSScriptRoot ` - -ArgumentList $arguments diff --git a/Install-Vcpkg.ps1 b/Install-Vcpkg.ps1 deleted file mode 100644 index c1af3152..00000000 --- a/Install-Vcpkg.ps1 +++ /dev/null @@ -1,131 +0,0 @@ -<# - .Synopsis - Builds vcpkg and installs its sources within the repository. - .Details - Invokes the build script for vcpkg then copies the executable and the scripts - used into requirements repository. - .Parameter VcpkgPath - Path to the directory containing the vcpkg source code. - .Parameter Clone - Repository to clone vpckg from, defaults to GitHub's microsoft/vcpkg. - - Ignored when a checkout is already present at `VcpkgPath`. - .Parameter Build - Whether to build the vcpkg.exe, defaults to `true`. - .Parameter Update - Whether to update the checkout of vcpkg. -#> - -param( - [Parameter(Mandatory)] - [string]$vcpkgPath, - [Parameter()] - [string]$clone, - [Parameter()] - [switch]$build=[switch]::Present, - [Parameter()] - [switch]$update -) - -$ErrorActionPreference = 'Stop'; - -# Save off current location -$currentPath = Get-Location; - -# Clone the repository if necessary -if (!(Test-Path $vcpkgPath)) { - Write-Host ('Repository not found at {0}' -f $vcpkgPath); - - if ($null -eq (Get-Command "git.exe" -ErrorAction SilentlyContinue)) { - Write-Error 'Unable to clone repository; git not present in path'; - return; - } - - if (!$clone) { - $clone = 'https://github.com/microsoft/vcpkg.git'; - } - $arguments = @('clone',$clone,$vcpkgPath); - Write-Host ('git {0}' -f ($arguments -join ' ')) - Start-Process -Wait -NoNewWindow ` - -FilePath 'git' ` - -WorkingDirectory $currentPath ` - -ArgumentList $arguments -} - -Set-Location $vcpkgPath; - -# Update the repository if necessary -if ($update) { - Write-Host ('Updating repository at {0}' -f $vcpkgPath) - - $arguments = @('pull'); - Write-Host ('git {0}' -f ($arguments -join ' ')); - Start-Process -Wait -NoNewWindow ` - -FilePath 'git' ` - -WorkingDirectory $vcpkgPath ` - -ArgumentList $arguments -} - -# Build the repository -if ($build) { - Invoke-Expression -Command ./scripts/bootstrap.ps1; -} - -# Copy files and folders into directory -function Copy-DirectoryStructure { - param( - [Parameter(Mandatory)] - [string]$path, - [Parameter(Mandatory)] - [string]$destination - ) - - Write-Host ('Copying directory from {0} to {1}' -f $path,$destination) - - # See if directory needs to be created - if (!(Test-Path $destination)) { - New-Item -ItemType Directory -Path $destination -Force | Out-Null; - } - - # Iterate through directories - $directories = Get-ChildItem $path -Dir; - - foreach ($dir in $directories) { - $fromPath = Join-Path $path $dir.Name; - $toPath = Join-Path $destination $dir.Name; - - Copy-DirectoryStructure -Path $fromPath -Destination $toPath; - } - - # Iterate through files - $files = Get-ChildItem $path -File; - - foreach ($file in $files) { - Copy-Item -Path $file.FullName -Destination $destination; - Write-Debug ('Copied {0}' -f $file.FullName) - } -} - -Copy-Item 'vcpkg.exe' -Force -Destination $PSScriptRoot; -Copy-Item '.vcpkg-root' -Force -Destination $PSScriptRoot; -Copy-DirectoryStructure ` - -Path (Join-Path $vcpkgPath 'scripts') ` - -Destination (Join-Path $PSScriptRoot 'scripts'); -Copy-DirectoryStructure ` - -Path (Join-Path $vcpkgPath -ChildPath 'triplets') ` - -Destination (Join-Path $PSScriptRoot -ChildPath 'triplets'); - -$portsDir = Join-Path $PSScriptRoot 'ports'; -$vcpkgPortsDir = Join-Path $vcpkgPath 'ports'; - -$ports = Get-ChildItem -Path $vcpkgPortsDir; -foreach ($port in $ports) { - if ($port.PSIsContainer -and $port.Name.StartsWith('vcpkg-')) { - Copy-DirectoryStructure ` - -Path (Join-Path $vcpkgPortsDir $port.Name) ` - -Destination (Join-Path $portsDir -ChildPath $port.Name); - } -} - -# Restore location -Set-Location $currentPath; diff --git a/README.md b/README.md index 840ccfa1..75c5ee7d 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,18 @@ # WebKitRequirements > Third party packages required for building the open source WebKit port for Windows. -## Setup - -WebKitRequirements uses [vcpkg](https://github.com/microsoft/vcpkg) to drive -building the libraries. A helper script, `Install-Vcpkg.ps1`, configures -`vcpkg` to be able to build the repository. - -```powershell -> Install-Vcpkg.ps1 -vcpkgPath [-update] -``` - -The script clones `vcpkg` at the given location if it is not already there. If -the `vcpkg` repository was already checked out at that location the script does -not automatically update the sources. An optional flag, `-update`, is required -to trigger a `git pull`. - -After the repository is ready the script will copy over any resources from the -`vcpkg` checkout that are required to do the build. View the -[Install-Vcpkg.ps1](Install-Vcpkg.ps1) script for additional options. - -## Building - -After installing `vcpkg` the requirements can be fully built using the -`Install-Requirements` script, which is just a wrapper around `vcpkg` which -builds the listed ports. A default is chosen based on the triplet, for windows -[WindowsRequirements.json](WindowsRequirements.json) is used. - -```powershell -> Install-Requirements.ps1 -triplet -``` - -After the script runs the requirements will be built in the expected manner for -use within WebKit. View the -[Install-Requirements.ps1](Install-Requirements.ps1) script for additional -options. - -Ports can be manually built using `vcpkg` directly. The -`Install-Requirements.ps1` is just provided as a convenience for fully building -the requirements. - -```powershell -> vcpkg.exe install --triplet -``` - -## Current Versions - -| Library | Version | Release Date | -|---|:---:|:---:| -| [icu](http://site.icu-project.org) | 76.1 | 2024-10-24 | -| [zlib](https://github.com/zlib-ng/zlib-ng) | 2.2.2 | 2024-09-17 | -| [brotli](https://github.com/google/brotli) | 1.1.0 | 2023-08-31 | -| [libressl](https://www.libressl.org) | 4.0.0 | 2024-10-14 | -| [nghttp2](https://nghttp2.org) | 1.64.0 | 2024-10-21 | -| [nghttp3](https://github.com/ngtcp2/nghttp3) | 1.6.0 | 2024-10-05 | -| [ngtcp2](https://github.com/ngtcp2/ngtcp2) | 1.8.1 | 2024-10-17 | -| [c-ares](https://c-ares.org) | 1.33.0 | 2024-08-02 | -| [curl](https://curl.se) | 8.11.0 | 2024-11-05 | -| [libxml2](http://xmlsoft.org) | 2.13.5 | 2024-11-12 | -| [libxslt](http://xmlsoft.org/libxslt) | 1.1.42 | 2024-07-04 | -| [lcms](https://www.littlecms.com/) | 2.16.0 | 2023-12-03 | -| [highway](https://github.com/google/highway) | 1.2.0 | 2024-05-31 | -| [libpng](http://www.libpng.org/pub/png/libpng.html) | 1.6.44 | 2024-09-12 | -| [libjpeg-turbo](http://libjpeg-turbo.virtualgl.org) | 3.0.3 | 2024-05-08 | -| [libwebp](https://github.com/webmproject/libwebp) | 1.4.0 | 2024-04-12 | -| [libjxl](https://github.com/libjxl/libjxl) | 0.11.0 | 2024-09-13 | -| [sqlite](http://sqlite.org) | 3.47.0 | 2024-10-21 | -| [woff2](https://github.com/google/woff2) | 1.0.2 | 2017-11-13 | -| [freetype](https://www.freetype.org) | 2.13.3 | 2024-08-12 | -| [harfbuzz](https://github.com/harfbuzz/harfbuzz) | 10.1.0 | 2024-11-04 | -| [pixman](http://www.pixman.org) | 0.42.2 | 2022-11-02 | -| [cairo](https://gitlab.freedesktop.org/cairo/cairo) | 1.18.0 | 2023-09-23 | -| [libpsl](https://github.com/rockdaboot/libpsl) | 0.21.5 | 2024-01-13 | +The WebKitRequirements repository is a +[vcpkg registry](https://learn.microsoft.com/en-us/vcpkg/concepts/registries) +which contains +[overlay ports](https://learn.microsoft.com/en-us/vcpkg/concepts/overlay-ports) +of third party libraries used in the Windows port of WebKit. + +## Overlay ports + +| Library | Version | Release Date | Reason for Overlay | +|---|:---:|:---:|---| +| [icu](http://site.icu-project.org) | 77.1 | 2025-03-13 | CMake port. Upstream pinned to 74.1 | +| [openssl](https://www.libressl.org/) | libressl | N/A | Map openssl to libressl | +| [zlib](https://github.com/zlib-ng/zlib-ng) | zlib-ng | N/A | Map zlib to zlib-ng | +| [curl](https://curl.se) | 8.16.0 | 2025-09-10 | Customization of build options, and release candidates | +| [cairo](https://gitlab.freedesktop.org/cairo/cairo) | 1.18.2 | 2024-09-01 | CMake port. Will remove when cairo taken out of WebKit | diff --git a/RELEASING.md b/RELEASING.md deleted file mode 100644 index c8a66e9f..00000000 --- a/RELEASING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Creating a release - -The WebKitRequirements repository uses GitHub releases to host a distribution -which are then downloaded by scripts contained in the WebKit repository. By -default the latest release will be downloaded when doing a WebKit build. Each -release corresponds to a tag within the git repository. - -## Tag names - -Tags are done based on the date of creation of the distribution. This is done -because the third party requirements change sporadically and semantic -versioning does not fit with the distribution. This provides a clear timeline -on when the requirements changed. - -## Creating the tag - -To create the tag have the commit that is being released checked out locally. -From there run the following commands where YYYY.MM.DD corresponds to the year -month and day the tag is created. - -``` -git tag -a vYYYY.MM.DD -m "vYYYY.MM.DD" -git push origin vYYYY.MM.DD -``` - -Once the tag is pushed a release can be created within GitHub. - -## Continuous Integration - -The WebKitRequirements repository uses [Drone](https://drone.io) to build the -release when a tag is pushed. It will create a GitHub release associated with -the tag and create the distribution for 32 and 64-bit WinCairo builds. - -# Manually creating a distribution - -The repository contains a number of scripts to create a distribution. These are -used to build locally consistently. - -All the scripts take a `triplet` value which specifies the toolchain. For -building WebKitRequirements two toolchain files were created because there are -some libraries that need to be built statically even when a dynamic build is -wanted. - -## Install script - -The `Install-Requirements.ps1` script is a wrapper around `vcpkg` which will -invoke `vcpkg install` with a list of requirements. The requirements are -defined in a .json file which is nothing more than a list of port names. - -## Creating the zip - -The `Release-Requirements.ps1` script creates a zip file containing the -dependencies. If a different filename is required then set the `-Output` flag -accordingly. - -## Command listing - -``` -& Install-Requirements.ps1 -triplet x64-windows-webkit -& Release-Requirements.ps1 -triplet x64-windows-webkit -``` diff --git a/Release-Requirements.ps1 b/Release-Requirements.ps1 deleted file mode 100644 index 7e32a257..00000000 --- a/Release-Requirements.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -<# - .Synopsis - Packages the requirements into a zip file for release. - .Parameter Triplet - The vcpkg triplet to use. - .Parameter Output - The filename to output to. Defaults to the form - `WebKitRequirements${Platform}.zip`. -#> - -param( - [Parameter(Mandatory)] - [string]$triplet, - [Parameter()] - [string]$output -) - -$ErrorActionPreference = 'Stop'; - -if (!$ouput) { - $tripletSplit = $triplet -split '-',3; - $arch = $tripletSplit[0]; - $platform = $tripletSplit[1]; - - if ($platform -eq 'windows') { - if ($arch -eq 'x64') { - $suffix = 'Win64'; - } else { - $suffix = 'Win32'; - } - } else { - Write-Error ('Unknown triplet {0}' -f $libraries); - } - - $output = ('WebKitRequirements{0}.zip' -f $suffix); -} - -Write-Host ('Creating archive {0}' -f $output) -Compress-7Zip -ArchiveFileName $output -Path ('{0}/installed/{1}' -f $PSScriptRoot,$triplet) diff --git a/Remove-Requirements.ps1 b/Remove-Requirements.ps1 deleted file mode 100644 index fa3a6034..00000000 --- a/Remove-Requirements.ps1 +++ /dev/null @@ -1,51 +0,0 @@ -<# - .Synopsis - Removes all the source code required for building WebKit. - .Details - Invokes vcpkg remove to clean all the libraries. - .Parameter Triplet - The vcpkg triplet to use. - .Parameter Libraries - Path to a JSON file containing the list of libraries. - - If the value is not provided then the script will guess at the value based on - the triplet. -#> - -param( - [Parameter(Mandatory)] - [string]$triplet, - [Parameter()] - [string]$libraries = '' -) - -$ErrorActionPreference = 'Stop'; - -if (!$libraries) { - $tripletSplit = $triplet -split '-',3; - $platform = $tripletSplit[1]; - - if ($platform -eq 'windows') { - $jsonName = 'WindowsRequirements.json'; - } else { - Write-Error ('Unknown triplet {0}' -f $libraries); - } - - $libraries = Join-Path $PSScriptRoot $jsonName; -} - -$json = Get-Content -Raw -Path $libraries | ConvertFrom-Json - -$arguments = @('remove') -foreach ($value in $json) { - $arguments += ($value -split '\[')[0]; -} -$arguments += '--triplet' -$arguments += $triplet - -Write-Host ('vcpkg {0}' -f ($arguments -join ' ')) - -Start-Process -Wait -NoNewWindow ` - -FilePath (Join-Path $PSScriptRoot 'vcpkg.exe') ` - -WorkingDirectory $PSScriptRoot ` - -ArgumentList $arguments diff --git a/WindowsRequirements.json b/WindowsRequirements.json deleted file mode 100644 index c1e5c910..00000000 --- a/WindowsRequirements.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - "zlib", - "brotli", - "libressl[tools]", - "nghttp2", - "ngtcp2[libressl]", - "nghttp3", - "curl[libressl,http3,ipv6]", - "icu", - "libxml2[xslt]", - "libxslt", - "lcms", - "highway", - "libpng", - "libjpeg-turbo", - "libwebp", - "libjxl", - "sqlite3", - "woff2", - "pixman", - "cairo", - "libpsl" -] diff --git a/ports/brotli/patches/0001-Make-cli-optional.patch b/ports/brotli/patches/0001-Make-cli-optional.patch deleted file mode 100644 index 4b544185..00000000 --- a/ports/brotli/patches/0001-Make-cli-optional.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 15ef8483cbcd760c7effb35dcb01ec6fce73a22d Mon Sep 17 00:00:00 2001 -From: Don -Date: Thu, 8 Mar 2018 12:20:35 -0800 -Subject: [PATCH 1/2] Make cli optional - -Conditionally build the `brotli` CLI tool. ---- - CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 61378cd..3c41d07 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -169,15 +169,19 @@ if(BROTLI_PARENT_DIRECTORY) - endif() - - # Build the brotli executable -+if(NOT BROTLI_DISABLE_CLI) - add_executable(brotli c/tools/brotli.c) - target_link_libraries(brotli ${BROTLI_LIBRARIES}) -+endif() - - # Installation - if(NOT BROTLI_BUNDLED_MODE) -+ if(NOT BROTLI_DISABLE_CLI) - install( - TARGETS brotli - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ) -+ endif() - - install( - TARGETS ${BROTLI_LIBRARIES_CORE} --- -2.42.0.windows.2 - diff --git a/ports/brotli/patches/0002-Add-__has_declspec_attribute.patch b/ports/brotli/patches/0002-Add-__has_declspec_attribute.patch deleted file mode 100644 index 10c568db..00000000 --- a/ports/brotli/patches/0002-Add-__has_declspec_attribute.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 254fa6dd1abb78ec775ae37e6e073a31f4a98131 Mon Sep 17 00:00:00 2001 -From: Don -Date: Mon, 24 Sep 2018 18:22:19 -0700 -Subject: [PATCH 2/2] Add __has_declspec_attribute - -Clang contains __has_declspec_attribute for MSVC compatibility. This can be -used to determine whether __declspec is available. ---- - c/include/brotli/port.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/c/include/brotli/port.h b/c/include/brotli/port.h -index 0d50019..beb54a1 100644 ---- a/c/include/brotli/port.h -+++ b/c/include/brotli/port.h -@@ -268,8 +268,12 @@ - - /* <<< <<< <<< end of hedley macros. */ - -+#ifndef __has_declspec_attribute -+#define __has_declspec_attribute(x) 0 -+#endif -+ - #if defined(BROTLI_SHARED_COMPILATION) --#if defined(_WIN32) -+#if defined(_WIN32) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport)) - #if defined(BROTLICOMMON_SHARED_COMPILATION) - #define BROTLI_COMMON_API __declspec(dllexport) - #else --- -2.42.0.windows.2 - diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake deleted file mode 100644 index 4afe276f..00000000 --- a/ports/brotli/portfile.cmake +++ /dev/null @@ -1,42 +0,0 @@ -set(VERSION 1.1.0) - -set(FILENAME "brotli-${VERSION}.zip") -set(URLS "https://github.com/google/brotli/archive/v${VERSION}.zip") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 e62f5624b58a6d0de27105d0df67324027d50a81c8cbb7c83d3322e952dc26ef0e30fc66f32f8b09151713bfae095032733ce4c06949f21b0461f2f16531938d -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Make-cli-optional.patch - ${CMAKE_CURRENT_LIST_DIR}/patches/0002-Add-__has_declspec_attribute.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBROTLI_DISABLE_CLI=ON - -DBROTLI_DISABLE_TESTS=ON -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/brotli/version ${VERSION}) diff --git a/ports/brotli/vcpkg.json b/ports/brotli/vcpkg.json deleted file mode 100644 index 5729ba2c..00000000 --- a/ports/brotli/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "brotli", - "version": "1.1.0", - "description": "Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods.", - "homepage": "https://github.com/google/brotli", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake deleted file mode 100644 index 7fd2fc1a..00000000 --- a/ports/c-ares/portfile.cmake +++ /dev/null @@ -1,65 +0,0 @@ -set(VERSION 1.33.0) - -set(FILENAME "c-ares-${VERSION}.tar.gz") -set(URLS "https://github.com/c-ares/c-ares/releases/download/v${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 3cf1b94d6e8e53742703a679d7e35d3f985320720f41fa58189a0bcad4aca80405c73c4689abe7879df292dbe8f3ddca34b2d48429af5afcc9d2933edb075788 -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - -DCARES_INSTALL=ON - -DCARES_BUILD_TESTS=OFF - -DCARES_BUILD_CONTAINER_TESTS=OFF - -DCARES_BUILD_TOOLS=OFF -) - -if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) - set(CARES_STATIC ON) - set(CARES_SHARED OFF) -else () - set(CARES_STATIC OFF) - set(CARES_SHARED ON) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} - -DCARES_STATIC=${CARES_STATIC} - -DCARES_SHARED=${CARES_SHARED} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/c-ares) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -if(CARES_STATIC) - vcpkg_replace_string( - "${CURRENT_PACKAGES_DIR}/include/ares.h" - "#ifdef CARES_STATICLIB" "#if 1" - ) - - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/c-ares RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/c-ares/version ${VERSION}) diff --git a/ports/c-ares/vcpkg.json b/ports/c-ares/vcpkg.json deleted file mode 100644 index 4ca37579..00000000 --- a/ports/c-ares/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "c-ares", - "version": "1.33.0", - "description": "A C library for asynchronous DNS requests", - "homepage": "https://c-ares.org", - "license": "MIT-CMU", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index ecd3ec63..bd85ce21 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -1,4 +1,4 @@ -set(VERSION 1.18.0) +set(VERSION 1.18.2) set(FILENAME "cairo-${VERSION}.tar.bz2") set(URLS "https://gitlab.freedesktop.org/cairo/cairo/-/archive/${VERSION}/${FILENAME}") @@ -7,7 +7,7 @@ set(URLS "https://gitlab.freedesktop.org/cairo/cairo/-/archive/${VERSION}/${FILE vcpkg_download_distfile(ARCHIVE URLS ${URLS} FILENAME ${FILENAME} - SHA512 bd702f3b64061f8add954c243c9b59f5d44271adfa76d997941ddab629ff8018c2a1d3368edf2362573e0018c342c61483de58240c63e15e1e6035d2511d3e40 + SHA512 8db31b675791b892379bc5fca7f421d3e8ebca9c3cbcdc27fa80efb1274f12d89276a54fa1ec18008f81de9b1dc2fafb9fbee9ee368e893e8b035a332d07e141 ) # Patches diff --git a/ports/cairo/vcpkg.json b/ports/cairo/vcpkg.json index b3785b25..e5e15063 100644 --- a/ports/cairo/vcpkg.json +++ b/ports/cairo/vcpkg.json @@ -1,6 +1,6 @@ { "name": "cairo", - "version": "1.18.0", + "version": "1.18.2", "description": "Cairo is a 2D graphics library with support for multiple output devices.", "homepage": "https://gitlab.freedesktop.org/cairo/cairo", "license": "MPL-1.1", @@ -15,10 +15,6 @@ "name": "vcpkg-cmake-config", "host": true }, - { - "name": "vcpkg-cmake-webkit", - "host": true - }, "zlib" ], "features": { diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 07e7934f..bebc59ca 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,14 +1,21 @@ -set(VERSION 8.11.0) +set(VERSION 8.16.0) string(REPLACE "." "_" TAG ${VERSION}) -set(FILENAME "curl-${VERSION}.zip") -set(URLS "https://github.com/curl/curl/releases/download/curl-${TAG}/${FILENAME}") +set(FILENAME "curl-${VERSION}.tar.xz") +if (VERSION MATCHES "-rc") + set(URLS "https://curl.se/rc/${FILENAME}") +else () + set(URLS + "https://curl.se/download/${FILENAME}" + "https://github.com/curl/curl/releases/download/curl-${TAG}/${FILENAME}" + ) +endif () # Get archive vcpkg_download_distfile(ARCHIVE URLS ${URLS} FILENAME ${FILENAME} - SHA512 41e6bd15106bc1bc5060f52b93d54cf64b4eb63203aee44058cf2a93e15192305c1c893dc34f38bf704f0e0b9e01685a0cac5a9e56e52af97d63645842c63f6a + SHA512 8262c3dc113cfd5744ef1b82dbccaa69448a9395ad5c094c22df5cf537a047a927d3332db2cb3be12a31a68a60d8d0fa8485b916e975eda36a4ebd860da4f621 ) # Extract archive diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index df01c038..d60df958 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -1,6 +1,7 @@ { "name": "curl", - "version": "8.11.0", + "version": "8.16.0", + "port-version": 1, "description": "A library for transferring data with URLs", "homepage": "https://curl.se/", "dependencies": [ @@ -14,14 +15,10 @@ "name": "vcpkg-cmake-config", "host": true }, - { - "name": "vcpkg-cmake-webkit", - "host": true - }, "zlib" ], "features": { - "ares": { + "c-ares": { "description": "Enable c-ares for asynchronous DNS requests.", "dependencies": [ "c-ares" @@ -37,7 +34,12 @@ "description": "Enable HTTP/3 support.", "dependencies": [ "nghttp3", - "ngtcp2" + { + "name": "ngtcp2", + "features": [ + "openssl" + ] + } ] }, "ipv6": { diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake deleted file mode 100644 index d11b47d2..00000000 --- a/ports/freetype/portfile.cmake +++ /dev/null @@ -1,77 +0,0 @@ -set(VERSION 2.13.3) - -set(FILENAME "freetype-${VERSION}.tar.xz") -set(URLS - "https://download.savannah.gnu.org/releases/freetype/${FILENAME}" - "https://downloads.sourceforge.net/project/freetype/freetype2/${VERSION}/${FILENAME}" -) - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 600828d7756c8cfa974448ef34ee0db573fb8cfdb2dc1e0358b63c44a03bfd7e3d4384424b9cc5e4749034f60231a550c4b7fcb46694fcacea218787ce305504 -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - # No BZIP support - -DFT_DISABLE_BZIP2=ON - -DFT_REQUIRE_BZIP2=OFF - # No Harfbuzz support - -DFT_DISABLE_HARFBUZZ=ON - -DFT_REQUIRE_HARFBUZZ=OFF -) - -if (png IN_LIST FEATURES) - message(STATUS "Enabling libpng") - list(APPEND BUILD_OPTIONS -DFT_DISABLE_PNG=OFF -DFT_REQUIRE_PNG=ON) -else () - list(APPEND BUILD_OPTIONS -DFT_DISABLE_PNG=ON -DFT_REQUIRE_PNG=OFF) -endif () - -if (woff2 IN_LIST FEATURES) - message(STATUS "Enabling woff2") - list(APPEND BUILD_OPTIONS -DFT_DISABLE_BROTLI=OFF -DFT_REQUIRE_BROTLI=ON) -else () - list(APPEND BUILD_OPTIONS -DFT_DISABLE_BROTLI=ON -DFT_REQUIRE_BROTLI=OFF) -endif () - -if (zlib IN_LIST FEATURES) - message(STATUS "Enabling system zlib") - list(APPEND BUILD_OPTIONS -DFT_DISABLE_ZLIB=OFF -DFT_REQUIRE_ZLIB=ON) -else () - list(APPEND BUILD_OPTIONS -DFT_DISABLE_ZLIB=ON -DFT_REQUIRE_ZLIB=OFF) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} - -DDISABLE_FORCE_DEBUG_POSTFIX=ON - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/freetype) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype RENAME copyright) -file(INSTALL - ${SOURCE_PATH}/docs/FTL.TXT - ${SOURCE_PATH}/docs/GPLv2.TXT - DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype -) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/version ${VERSION}) diff --git a/ports/freetype/vcpkg.json b/ports/freetype/vcpkg.json deleted file mode 100644 index c429f71f..00000000 --- a/ports/freetype/vcpkg.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "freetype", - "version": "2.13.3", - "description": "A library to render fonts.", - "homepage": "https://www.freetype.org", - "license": "FTL OR GPL-2.0-or-later", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ], - "features": { - "png": { - "description": "Support PNG compressed OpenType embedded bitmaps.", - "dependencies": [ - "libpng" - ] - }, - "woff2": { - "description": "Enable WOFF2 font support.", - "dependencies": [ - "brotli" - ] - }, - "zlib": { - "description": "Use zlib instead of internal library for DEFLATE", - "dependencies": [ - "zlib" - ] - } - } -} diff --git a/ports/harfbuzz/patches/0001-Remove-icu-uc-from-pkgconfig.patch b/ports/harfbuzz/patches/0001-Remove-icu-uc-from-pkgconfig.patch deleted file mode 100644 index c1a2700f..00000000 --- a/ports/harfbuzz/patches/0001-Remove-icu-uc-from-pkgconfig.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 65464b145fe54fe5009f19a3cfec20a082045b14 Mon Sep 17 00:00:00 2001 -From: Don -Date: Sat, 24 Sep 2022 18:57:06 -0700 -Subject: [PATCH] Remove icu-uc from pkgconfig - -The icu build doesn't output a pkgconfig so vcpkg will fail to fix up harfbuzz's pkgconfig. ---- - src/harfbuzz-icu.pc.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/harfbuzz-icu.pc.in b/src/harfbuzz-icu.pc.in -index 949869a35..5be5b2686 100644 ---- a/src/harfbuzz-icu.pc.in -+++ b/src/harfbuzz-icu.pc.in -@@ -8,6 +8,5 @@ Description: HarfBuzz text shaping library ICU integration - Version: %VERSION% - - Requires: harfbuzz --Requires.private: icu-uc - Libs: -L${libdir} -lharfbuzz-icu - Cflags: -I${includedir}/harfbuzz --- -2.46.1.windows.1 - diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake deleted file mode 100644 index 52d0b569..00000000 --- a/ports/harfbuzz/portfile.cmake +++ /dev/null @@ -1,46 +0,0 @@ -set(VERSION 10.1.0) - -set(FILENAME "harfbuzz-${VERSION}.tar.xz") -set(URLS "https://github.com/harfbuzz/harfbuzz/releases/download/${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 14b0e8fd417af9c78f36e532e3737c163902b85837be1028a8fd569508639b87afeb56f70a2313ba2f0f6d4b72bb6cee0bf50fb333dfc503c713e4d9cd86e9c3 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Remove-icu-uc-from-pkgconfig.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DHB_HAVE_FREETYPE=ON - -DHB_HAVE_ICU=ON - -DHB_BUILD_UTILS=OFF - -DHB_BUILD_SUBSET=OFF - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/harfbuzz) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/harfbuzz/version ${VERSION}) diff --git a/ports/harfbuzz/vcpkg.json b/ports/harfbuzz/vcpkg.json deleted file mode 100644 index c332b066..00000000 --- a/ports/harfbuzz/vcpkg.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "harfbuzz", - "version": "10.1.0", - "description": "HarfBuzz OpenType text shaping engine", - "homepage": "https://github.com/harfbuzz/harfbuzz", - "license": "MIT-Modern-Variant", - "dependencies": [ - "freetype", - { - "name": "icu", - "platform": "!linux" - }, - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/highway/portfile.cmake b/ports/highway/portfile.cmake deleted file mode 100644 index 01ba9426..00000000 --- a/ports/highway/portfile.cmake +++ /dev/null @@ -1,46 +0,0 @@ -set(VERSION 1.2.0) - -set(FILENAME "highway-${VERSION}.tar.gz") -set(URLS "https://github.com/google/highway/releases/download/${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 34b2204eafaec8e092d970831881d757c4131288db4fac12d6f0e6cf7c0a36ca8c029ce888118803dd196831fe8c26d54c7c4bfc4c6d177220f50f67e63d0d87 -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - -DHWY_ENABLE_CONTRIB=OFF - -DHWY_ENABLE_EXAMPLES=OFF - -DHWY_ENABLE_INSTALL=ON - -DHWY_ENABLE_TESTS=OFF - - -DBUILD_TESTING=OFF -) - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/hwy) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highway RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/highway/version ${VERSION}) diff --git a/ports/highway/vcpkg.json b/ports/highway/vcpkg.json deleted file mode 100644 index 27138446..00000000 --- a/ports/highway/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "highway", - "version": "1.2.0", - "description": "Performance-portable, length-agnostic SIMD with runtime dispatch.", - "homepage": "https://github.com/google/highway", - "license": "Apache-2.0", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/icu/patches/0001-Add-CMake-platform.patch b/ports/icu/patches/0001-Add-CMake-platform.patch index 94584693..dc6db36d 100644 --- a/ports/icu/patches/0001-Add-CMake-platform.patch +++ b/ports/icu/patches/0001-Add-CMake-platform.patch @@ -1,4 +1,4 @@ -From 7e63d74cc82685e08681a24452823cc6b1f8fa8b Mon Sep 17 00:00:00 2001 +From 978fa445319a5982c6d06b46eee8d1fa4cc8e0a7 Mon Sep 17 00:00:00 2001 From: foopoiuyt Date: Tue, 3 Nov 2020 08:58:19 -0800 Subject: [PATCH 1/2] Add CMake platform @@ -7,7 +7,7 @@ Modified version of the LibCMaker ICU files. --- LICENSE_CMakeLists | 60 + README_CMakeLists.txt | 146 + - source/CMakeLists.txt | 175 + + source/CMakeLists.txt | 167 + source/cmake/Config.in.cmake | 127 + source/common/CMakeLists.txt | 98 + source/common_icu_lib_flags.cmake | 127 + @@ -56,7 +56,7 @@ Modified version of the LibCMaker ICU files. source/tools/makeconv/CMakeLists.txt | 31 + source/tools/pkgdata/CMakeLists.txt | 35 + source/tools/toolutil/CMakeLists.txt | 59 + - 51 files changed, 20125 insertions(+) + 51 files changed, 20117 insertions(+) create mode 100644 LICENSE_CMakeLists create mode 100644 README_CMakeLists.txt create mode 100644 source/CMakeLists.txt @@ -329,10 +329,10 @@ index 00000000000..356e81fa505 +See file 'LICENSE_CMakeLists' for license information. diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt new file mode 100644 -index 00000000000..81392799232 +index 00000000000..ceb4f8986e7 --- /dev/null +++ b/source/CMakeLists.txt -@@ -0,0 +1,175 @@ +@@ -0,0 +1,167 @@ +# Copyright (c) 2018, NikitaFeodonit. All rights reserved. +# Copyright (c) 2014, 2018, Ruslan Baratov. All rights reserved. +# @@ -356,15 +356,7 @@ index 00000000000..81392799232 +# Configure CMake itself +# ####################################################################################################### + -+if(CMAKE_GENERATOR MATCHES "Visual Studio.*") -+ message(STATUS "CMake 3.11+ is required for Visual Studio generator.") -+ cmake_minimum_required(VERSION 3.11) -+elseif(CMAKE_GENERATOR MATCHES "Xcode") -+ message(STATUS "CMake 3.12+ is required for Xcode generator.") -+ cmake_minimum_required(VERSION 3.12) -+else() -+ cmake_minimum_required(VERSION 3.4) -+endif() ++cmake_minimum_required(VERSION 3.12) + +if(POLICY CMP0067) + # Honor language standard in try_compile() source-file signature. Introduced in CMake 3.8. @@ -20541,4 +20533,4 @@ index 00000000000..36b15d4783d + DESTINATION "${includedir}" +) -- -2.47.0.windows.1 +2.49.0.windows.1 diff --git a/ports/icu/patches/0002-Remove-install-suffix-on-Windows.patch b/ports/icu/patches/0002-Remove-install-suffix-on-Windows.patch index 73693375..6de452ec 100644 --- a/ports/icu/patches/0002-Remove-install-suffix-on-Windows.patch +++ b/ports/icu/patches/0002-Remove-install-suffix-on-Windows.patch @@ -1,4 +1,4 @@ -From a0a875c2d9c900399a1f54e92ed2c5005251b51f Mon Sep 17 00:00:00 2001 +From b8c2406b2bd0e6d5f0902650ae963637a2be7ccc Mon Sep 17 00:00:00 2001 From: foopoiuyt Date: Tue, 3 Nov 2020 09:02:25 -0800 Subject: [PATCH 2/2] Remove install suffix on Windows @@ -27,4 +27,4 @@ index 34688e43176..f1e1ba7b13e 100644 # Package information set(PACKAGE_ICU_DESCRIPTION "International Components for Unicode") -- -2.47.0.windows.1 +2.49.0.windows.1 diff --git a/ports/icu/patches/0003-Append-CMAKE_EXECUTABLE_SUFFIX-to-tool-paths.patch b/ports/icu/patches/0003-Append-CMAKE_EXECUTABLE_SUFFIX-to-tool-paths.patch new file mode 100644 index 00000000..14a2abdd --- /dev/null +++ b/ports/icu/patches/0003-Append-CMAKE_EXECUTABLE_SUFFIX-to-tool-paths.patch @@ -0,0 +1,449 @@ +--- a/source/data/CMakeLists.txt 2026-02-05 18:06:41.270799091 -0500 ++++ b/source/data/CMakeLists.txt 2026-02-05 18:07:45.873543869 -0500 +@@ -112,7 +112,7 @@ + set(ICUPKGDATA_OUTDIR ${OUTDIR}) + + set(PKGDATA +- ${TOOLBINDIR}/pkgdata ++ ${TOOLBINDIR}/pkgdata${CMAKE_EXECUTABLE_SUFFIX} + ${PKGDATA_OPTS} + -c # --copyright + -s +@@ -183,7 +183,7 @@ + + add_custom_command( + OUTPUT ${ICUDATA_SOURCE_ARCHIVE} ${icudata_source_archive_STAMP} +- COMMAND ${TOOLBINDIR}/icupkg -t${ICUDATA_CHAR} # --type ++ COMMAND ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} -t${ICUDATA_CHAR} # --type + ${ICUDATA_ARCHIVE} ${ICUDATA_SOURCE_ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E touch ${icudata_source_archive_STAMP} + DEPENDS ${deps_icupkg} ${ICUDATA_ARCHIVE} # ${OUTDIR} +@@ -225,7 +225,7 @@ + OUTPUT ${PKGDATA_LIST} ${pkgdata_list_STAMP} + COMMAND ${CMAKE_COMMAND} -E remove -f ${PKGDATA_LIST} + COMMAND +- ${TOOLBINDIR}/icupkg -d ${BUILDDIR} # --destdir ++ ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} -d ${BUILDDIR} # --destdir + --list -x ${extract_pattern} # --extract + ${ICUDATA_SOURCE_ARCHIVE} -o ${PKGDATA_LIST} # --outlist + COMMAND ${CMAKE_COMMAND} -E touch ${pkgdata_list_STAMP} +--- a/source/data/rules.cmake 2026-02-05 18:06:41.272384701 -0500 ++++ b/source/data/rules.cmake 2026-02-05 18:07:45.884110040 -0500 +@@ -26,21 +26,21 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/cnvalias.icu +- DEPENDS data_dirs ${IN_DIR}/mappings/convrtrs.txt ${TOOLBINDIR}/gencnval +- COMMAND ${TOOLBINDIR}/gencnval -s ${IN_DIR} -d ${OUT_DIR} mappings/convrtrs.txt ++ DEPENDS data_dirs ${IN_DIR}/mappings/convrtrs.txt ${TOOLBINDIR}/gencnval${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/gencnval${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR} -d ${OUT_DIR} mappings/convrtrs.txt + ) + + add_custom_command( + OUTPUT ${OUT_DIR}/ulayout.icu +- DEPENDS data_dirs ${IN_DIR}/in/ulayout.icu ${TOOLBINDIR}/icupkg +- COMMAND ${TOOLBINDIR}/icupkg -t${ICUDATA_CHAR} ${IN_DIR}/in/ulayout.icu ${OUT_DIR}/ulayout.icu ++ DEPENDS data_dirs ${IN_DIR}/in/ulayout.icu ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} -t${ICUDATA_CHAR} ${IN_DIR}/in/ulayout.icu ${OUT_DIR}/ulayout.icu + ) + + add_custom_command( + OUTPUT ${OUT_DIR}/confusables.cfu + DEPENDS data_dirs ${OUT_DIR}/cnvalias.icu ${IN_DIR}/unidata/confusables.txt +- ${IN_DIR}/unidata/confusablesWholeScript.txt ${TOOLBINDIR}/gencfu +- COMMAND ${TOOLBINDIR}/gencfu -d ${OUT_DIR} -i ${OUT_DIR} -c -r ${IN_DIR}/unidata/confusables.txt -w ++ ${IN_DIR}/unidata/confusablesWholeScript.txt ${TOOLBINDIR}/gencfu${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/gencfu${CMAKE_EXECUTABLE_SUFFIX} -d ${OUT_DIR} -i ${OUT_DIR} -c -r ${IN_DIR}/unidata/confusables.txt -w + ${IN_DIR}/unidata/confusablesWholeScript.txt -o confusables.cfu + ) + +@@ -50,8 +50,8 @@ + file(TO_NATIVE_PATH "mappings/${FILE}.ucm" CNV_INPUT) + add_custom_command( + OUTPUT ${OUT_DIR}/${FILE}.cnv +- DEPENDS data_dirs ${IN_DIR}/mappings/${FILE}.ucm ${TOOLBINDIR}/makeconv +- COMMAND ${TOOLBINDIR}/makeconv -s ${IN_DIR} -d ${OUT_DIR} -c ${CNV_INPUT} ++ DEPENDS data_dirs ${IN_DIR}/mappings/${FILE}.ucm ${TOOLBINDIR}/makeconv${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/makeconv${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR} -d ${OUT_DIR} -c ${CNV_INPUT} + ) + endfunction() + +@@ -260,8 +260,8 @@ + macro(generate_brk FILE) + add_custom_command( + OUTPUT ${OUT_DIR}/brkitr/${FILE}.brk +- DEPENDS data_dirs ${BRKITR_BRK_DEPS} ${IN_DIR}/brkitr/rules/${FILE}.txt ${TOOLBINDIR}/genbrk +- COMMAND ${TOOLBINDIR}/genbrk -d ${OUT_DIR} -i ${OUT_DIR} -c -r ++ DEPENDS data_dirs ${BRKITR_BRK_DEPS} ${IN_DIR}/brkitr/rules/${FILE}.txt ${TOOLBINDIR}/genbrk${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genbrk${CMAKE_EXECUTABLE_SUFFIX} -d ${OUT_DIR} -i ${OUT_DIR} -c -r + ${IN_DIR}/brkitr/rules/${FILE}.txt -o brkitr/${FILE}.brk + ) + endmacro() +@@ -307,8 +307,8 @@ + macro(generate_spp FILE) + add_custom_command( + OUTPUT ${OUT_DIR}/${FILE}.spp +- DEPENDS data_dirs ${STRINGPREP_DEPS} ${IN_DIR}/sprep/${FILE}.txt ${TOOLBINDIR}/gensprep +- COMMAND ${TOOLBINDIR}/gensprep -s ${IN_DIR}/sprep -d ${OUT_DIR} -i ${OUT_DIR} -b ${SPP_FILE} -m ++ DEPENDS data_dirs ${STRINGPREP_DEPS} ${IN_DIR}/sprep/${FILE}.txt ${TOOLBINDIR}/gensprep${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/gensprep${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/sprep -d ${OUT_DIR} -i ${OUT_DIR} -b ${SPP_FILE} -m + ${IN_DIR}/unidata -u 3.2.0 ${FILE}.txt + ) + endmacro() +@@ -323,8 +323,8 @@ + function(generate_brkitrdict FILE) + add_custom_command( + OUTPUT ${OUT_DIR}/brkitr/${FILE}.dict +- DEPENDS data_dirs ${IN_DIR}/brkitr/dictionaries/${FILE}.txt ${TOOLBINDIR}/gendict +- COMMAND ${TOOLBINDIR}/gendict -i ${OUT_DIR} -c ${BRKITR_DICT_${FILE}_FLAGS} ++ DEPENDS data_dirs ${IN_DIR}/brkitr/dictionaries/${FILE}.txt ${TOOLBINDIR}/gendict${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/gendict${CMAKE_EXECUTABLE_SUFFIX} -i ${OUT_DIR} -c ${BRKITR_DICT_${FILE}_FLAGS} + ${IN_DIR}/brkitr/dictionaries/${FILE}.txt ${OUT_DIR}/brkitr/${FILE}.dict + ) + endfunction() +@@ -346,8 +346,8 @@ + function(generate_nrm FILE) + add_custom_command( + OUTPUT ${OUT_DIR}/${FILE}.nrm +- DEPENDS data_dirs ${IN_DIR}/in/${FILE}.nrm ${TOOLBINDIR}/icupkg +- COMMAND ${TOOLBINDIR}/icupkg -t${ICUDATA_CHAR} ${IN_DIR}/in/${FILE}.nrm ${OUT_DIR}/${FILE}.nrm ++ DEPENDS data_dirs ${IN_DIR}/in/${FILE}.nrm ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} -t${ICUDATA_CHAR} ${IN_DIR}/in/${FILE}.nrm ${OUT_DIR}/${FILE}.nrm + ) + endfunction() + +@@ -361,8 +361,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/coll/ucadata.icu +- DEPENDS data_dirs ${IN_DIR}/in/coll/ucadata-unihan.icu ${TOOLBINDIR}/icupkg +- COMMAND ${TOOLBINDIR}/icupkg -t${ICUDATA_CHAR} ${IN_DIR}/in/coll/ucadata-unihan.icu ++ DEPENDS data_dirs ${IN_DIR}/in/coll/ucadata-unihan.icu ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} -t${ICUDATA_CHAR} ${IN_DIR}/in/coll/ucadata-unihan.icu + ${OUT_DIR}/coll/ucadata.icu + ) + +@@ -370,8 +370,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/unames.icu +- DEPENDS data_dirs ${IN_DIR}/in/unames.icu ${TOOLBINDIR}/icupkg +- COMMAND ${TOOLBINDIR}/icupkg -t${ICUDATA_CHAR} ${IN_DIR}/in/unames.icu ${OUT_DIR}/unames.icu ++ DEPENDS data_dirs ${IN_DIR}/in/unames.icu ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/icupkg${CMAKE_EXECUTABLE_SUFFIX} -t${ICUDATA_CHAR} ${IN_DIR}/in/unames.icu ${OUT_DIR}/unames.icu + ) + + # misc res +@@ -379,8 +379,8 @@ + function(generate_misc_res FILE) + add_custom_command( + OUTPUT ${OUT_DIR}/${FILE}.res +- DEPENDS data_dirs ${IN_DIR}/misc/${FILE}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/misc -d ${OUT_DIR} -i ${OUT_DIR} -k -q ${FILE}.txt ++ DEPENDS data_dirs ${IN_DIR}/misc/${FILE}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/misc -d ${OUT_DIR} -i ${OUT_DIR} -k -q ${FILE}.txt + ) + endfunction() + +@@ -413,8 +413,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/curr/supplementalData.res +- DEPENDS data_dirs ${IN_DIR}/curr/supplementalData.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/curr -d ${OUT_DIR}/curr -i ${OUT_DIR} -k -q ++ DEPENDS data_dirs ${IN_DIR}/curr/supplementalData.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/curr -d ${OUT_DIR}/curr -i ${OUT_DIR} -k -q + supplementalData.txt + ) + list(APPEND tmpdep ${OUT_DIR}/curr/supplementalData.res) +@@ -781,20 +781,20 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/translit/root.res +- DEPENDS data_dirs ${IN_DIR}/translit/root.txt ${TRANSLIT_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/translit -d ${OUT_DIR}/translit/ -i ${OUT_DIR} -k root.txt ++ DEPENDS data_dirs ${IN_DIR}/translit/root.txt ${TRANSLIT_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/translit -d ${OUT_DIR}/translit/ -i ${OUT_DIR} -k root.txt + ) + + add_custom_command( + OUTPUT ${OUT_DIR}/translit/en.res +- DEPENDS data_dirs ${IN_DIR}/translit/en.txt ${TRANSLIT_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/translit -d ${OUT_DIR}/translit/ -i ${OUT_DIR} -k en.txt ++ DEPENDS data_dirs ${IN_DIR}/translit/en.txt ${TRANSLIT_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/translit -d ${OUT_DIR}/translit/ -i ${OUT_DIR} -k en.txt + ) + + add_custom_command( + OUTPUT ${OUT_DIR}/translit/el.res +- DEPENDS data_dirs ${IN_DIR}/translit/el.txt ${TRANSLIT_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/translit -d ${OUT_DIR}/translit/ -i ${OUT_DIR} -k el.txt ++ DEPENDS data_dirs ${IN_DIR}/translit/el.txt ${TRANSLIT_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/translit -d ${OUT_DIR}/translit/ -i ${OUT_DIR} -k el.txt + ) + + # locales pool +@@ -1645,8 +1645,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/pool.res +- DEPENDS data_dirs ${LOCALES_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/locales -d ${OUT_DIR}/ -i ${OUT_DIR} --writePoolBundle -k ++ DEPENDS data_dirs ${LOCALES_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/locales -d ${OUT_DIR}/ -i ${OUT_DIR} --writePoolBundle -k + ${LOCALES_POOL_WRITE_FILES} + ) + +@@ -1655,8 +1655,8 @@ + function(generate_locale_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/locales/${ITEM}.txt ${LOCALES_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/locales -d ${OUT_DIR}/ -i ${OUT_DIR} --usePoolBundle ++ DEPENDS data_dirs ${IN_DIR}/locales/${ITEM}.txt ${LOCALES_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/locales -d ${OUT_DIR}/ -i ${OUT_DIR} --usePoolBundle + ${OUT_DIR}/ -k ${ITEM}.txt + ) + endfunction() +@@ -1671,8 +1671,8 @@ + configure_file(${IN_DIR}/cmake-locales-index-txt-content.in ${TMP_DIR}/locales/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/locales/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/locales -d ${OUT_DIR}/ -i ${OUT_DIR} -k ${INDEX_NAME}.txt ++ DEPENDS data_dirs ${TMP_DIR}/locales/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/locales -d ${OUT_DIR}/ -i ${OUT_DIR} -k ${INDEX_NAME}.txt + ) + + # curr pool +@@ -2231,8 +2231,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/curr/pool.res +- DEPENDS data_dirs ${CURR_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/curr -d ${OUT_DIR}/curr/ -i ${OUT_DIR} --writePoolBundle -k ++ DEPENDS data_dirs ${CURR_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/curr -d ${OUT_DIR}/curr/ -i ${OUT_DIR} --writePoolBundle -k + ${CURR_POOL_WRITE_FILES} + ) + +@@ -2241,8 +2241,8 @@ + function(generate_curr_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/curr/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/curr/${ITEM}.txt ${CURR_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/curr -d ${OUT_DIR}/curr/ -i ${OUT_DIR} --usePoolBundle ++ DEPENDS data_dirs ${IN_DIR}/curr/${ITEM}.txt ${CURR_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/curr -d ${OUT_DIR}/curr/ -i ${OUT_DIR} --usePoolBundle + ${OUT_DIR}/curr/ -k ${ITEM}.txt + ) + endfunction() +@@ -2257,8 +2257,8 @@ + configure_file(${IN_DIR}/cmake-curr-index-txt-content.in ${TMP_DIR}/curr/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/curr/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/curr/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/curr -d ${OUT_DIR}/curr/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/curr/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/curr -d ${OUT_DIR}/curr/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + list(APPEND tmpdep ${OUT_DIR}/curr/${INDEX_NAME}.res) +@@ -2749,8 +2749,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/lang/pool.res +- DEPENDS data_dirs ${LANG_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/lang -d ${OUT_DIR}/lang/ -i ${OUT_DIR} --writePoolBundle -k ++ DEPENDS data_dirs ${LANG_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/lang -d ${OUT_DIR}/lang/ -i ${OUT_DIR} --writePoolBundle -k + ${LANG_POOL_WRITE_FILES} + ) + +@@ -2759,8 +2759,8 @@ + function(generate_lang_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/lang/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/lang/${ITEM}.txt ${LANG_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/lang -d ${OUT_DIR}/lang/ -i ${OUT_DIR} --usePoolBundle ++ DEPENDS data_dirs ${IN_DIR}/lang/${ITEM}.txt ${LANG_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/lang -d ${OUT_DIR}/lang/ -i ${OUT_DIR} --usePoolBundle + ${OUT_DIR}/lang/ -k ${ITEM}.txt + ) + endfunction() +@@ -2775,8 +2775,8 @@ + configure_file(${IN_DIR}/cmake-lang-index-txt-content.in ${TMP_DIR}/lang/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/lang/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/lang/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/lang -d ${OUT_DIR}/lang/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/lang/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/lang -d ${OUT_DIR}/lang/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + +@@ -3265,8 +3265,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/region/pool.res +- DEPENDS data_dirs ${REGION_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/region -d ${OUT_DIR}/region/ -i ${OUT_DIR} ++ DEPENDS data_dirs ${REGION_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/region -d ${OUT_DIR}/region/ -i ${OUT_DIR} + --writePoolBundle -k ${REGION_POOL_WRITE_FILES} + ) + +@@ -3275,8 +3275,8 @@ + function(generate_region_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/region/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/region/${ITEM}.txt ${REGION_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/region -d ${OUT_DIR}/region/ -i ${OUT_DIR} ++ DEPENDS data_dirs ${IN_DIR}/region/${ITEM}.txt ${REGION_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/region -d ${OUT_DIR}/region/ -i ${OUT_DIR} + --usePoolBundle ${OUT_DIR}/region/ -k ${ITEM}.txt + ) + endfunction() +@@ -3291,8 +3291,8 @@ + configure_file(${IN_DIR}/cmake-region-index-txt-content.in ${TMP_DIR}/region/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/region/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/region/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/region -d ${OUT_DIR}/region/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/region/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/region -d ${OUT_DIR}/region/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + +@@ -3781,8 +3781,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/zone/pool.res +- DEPENDS data_dirs ${ZONE_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/zone -d ${OUT_DIR}/zone/ -i ${OUT_DIR} --writePoolBundle -k ++ DEPENDS data_dirs ${ZONE_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/zone -d ${OUT_DIR}/zone/ -i ${OUT_DIR} --writePoolBundle -k + ${ZONE_POOL_WRITE_FILES} + ) + +@@ -3791,8 +3791,8 @@ + function(generate_zone_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/zone/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/zone/${ITEM}.txt ${ZONE_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/zone -d ${OUT_DIR}/zone/ -i ${OUT_DIR} --usePoolBundle ++ DEPENDS data_dirs ${IN_DIR}/zone/${ITEM}.txt ${ZONE_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/zone -d ${OUT_DIR}/zone/ -i ${OUT_DIR} --usePoolBundle + ${OUT_DIR}/zone/ -k ${ITEM}.txt + ) + endfunction() +@@ -3807,8 +3807,8 @@ + configure_file(${IN_DIR}/cmake-zone-index-txt-content.in ${TMP_DIR}/zone/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/zone/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/zone/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/zone -d ${OUT_DIR}/zone/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/zone/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/zone -d ${OUT_DIR}/zone/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + +@@ -4288,8 +4288,8 @@ + + add_custom_command( + OUTPUT ${OUT_DIR}/unit/pool.res +- DEPENDS data_dirs ${UNIT_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/unit -d ${OUT_DIR}/unit/ -i ${OUT_DIR} --writePoolBundle -k ++ DEPENDS data_dirs ${UNIT_POOL_WRITE_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/unit -d ${OUT_DIR}/unit/ -i ${OUT_DIR} --writePoolBundle -k + ${UNIT_POOL_WRITE_FILES} + ) + +@@ -4298,8 +4298,8 @@ + function(generate_unit_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/unit/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/unit/${ITEM}.txt ${UNIT_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/unit -d ${OUT_DIR}/unit/ -i ${OUT_DIR} --usePoolBundle ++ DEPENDS data_dirs ${IN_DIR}/unit/${ITEM}.txt ${UNIT_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/unit -d ${OUT_DIR}/unit/ -i ${OUT_DIR} --usePoolBundle + ${OUT_DIR}/unit/ -k ${ITEM}.txt + ) + endfunction() +@@ -4314,8 +4314,8 @@ + configure_file(${IN_DIR}/cmake-unit-index-txt-content.in ${TMP_DIR}/unit/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/unit/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/unit/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/unit -d ${OUT_DIR}/unit/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/unit/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/unit -d ${OUT_DIR}/unit/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + +@@ -4514,8 +4514,8 @@ + function(generate_coll_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/coll/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/coll/${ITEM}.txt ${COLL_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/coll -d ${OUT_DIR}/coll/ -i ${OUT_DIR} -k ${ITEM}.txt ++ DEPENDS data_dirs ${IN_DIR}/coll/${ITEM}.txt ${COLL_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/coll -d ${OUT_DIR}/coll/ -i ${OUT_DIR} -k ${ITEM}.txt + ) + endfunction() + +@@ -4529,8 +4529,8 @@ + configure_file(${IN_DIR}/cmake-coll-index-txt-content.in ${TMP_DIR}/coll/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/coll/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/coll/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/coll -d ${OUT_DIR}/coll/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/coll/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/coll -d ${OUT_DIR}/coll/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + +@@ -4578,8 +4578,8 @@ + function(generate_brkitr_res_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/brkitr/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/brkitr/${ITEM}.txt ${BRKITR_RES_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/brkitr -d ${OUT_DIR}/brkitr/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${IN_DIR}/brkitr/${ITEM}.txt ${BRKITR_RES_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/brkitr -d ${OUT_DIR}/brkitr/ -i ${OUT_DIR} -k + ${ITEM}.txt + ) + endfunction() +@@ -4594,8 +4594,8 @@ + configure_file(${IN_DIR}/cmake-brkitr-index-txt-content.in ${TMP_DIR}/brkitr/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/brkitr/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/brkitr/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/brkitr -d ${OUT_DIR}/brkitr/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/brkitr/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/brkitr -d ${OUT_DIR}/brkitr/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + +@@ -4714,8 +4714,8 @@ + function(generate_rbnf_item ITEM) + add_custom_command( + OUTPUT ${OUT_DIR}/rbnf/${ITEM}.res +- DEPENDS data_dirs ${IN_DIR}/rbnf/${ITEM}.txt ${RBNF_DEPS} ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${IN_DIR}/rbnf -d ${OUT_DIR}/rbnf/ -i ${OUT_DIR} -k ${ITEM}.txt ++ DEPENDS data_dirs ${IN_DIR}/rbnf/${ITEM}.txt ${RBNF_DEPS} ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${IN_DIR}/rbnf -d ${OUT_DIR}/rbnf/ -i ${OUT_DIR} -k ${ITEM}.txt + ) + endfunction() + +@@ -4729,8 +4729,8 @@ + configure_file(${IN_DIR}/cmake-rbnf-index-txt-content.in ${TMP_DIR}/rbnf/${INDEX_NAME}.txt) + add_custom_command( + OUTPUT ${OUT_DIR}/rbnf/${INDEX_NAME}.res +- DEPENDS data_dirs ${TMP_DIR}/rbnf/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb +- COMMAND ${TOOLBINDIR}/genrb -s ${TMP_DIR}/rbnf -d ${OUT_DIR}/rbnf/ -i ${OUT_DIR} -k ++ DEPENDS data_dirs ${TMP_DIR}/rbnf/${INDEX_NAME}.txt ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} ++ COMMAND ${TOOLBINDIR}/genrb${CMAKE_EXECUTABLE_SUFFIX} -s ${TMP_DIR}/rbnf -d ${OUT_DIR}/rbnf/ -i ${OUT_DIR} -k + ${INDEX_NAME}.txt + ) + diff --git a/ports/icu/patches/0004-Copy-stubdata-dll-to-bin-for-cross-compile.patch b/ports/icu/patches/0004-Copy-stubdata-dll-to-bin-for-cross-compile.patch new file mode 100644 index 00000000..d63ae690 --- /dev/null +++ b/ports/icu/patches/0004-Copy-stubdata-dll-to-bin-for-cross-compile.patch @@ -0,0 +1,11 @@ +--- a/source/stubdata/CMakeLists.txt ++++ b/source/stubdata/CMakeLists.txt +@@ -43,7 +43,7 @@ + + setup_icu_target("${lib_NAME}" "${CMAKE_CURRENT_LIST_DIR}/sources.txt" "${CMAKE_CURRENT_LIST_DIR}") + +-if(CMAKE_HOST_WIN32 ++if(WIN32 + AND BUILD_SHARED_LIBS + AND (MSVC OR MINGW) + ) diff --git a/ports/icu/patches/0005-Pass-optCpuArch-from-pkgdata-to-writeObjectCode.patch b/ports/icu/patches/0005-Pass-optCpuArch-from-pkgdata-to-writeObjectCode.patch new file mode 100644 index 00000000..58aa1ef1 --- /dev/null +++ b/ports/icu/patches/0005-Pass-optCpuArch-from-pkgdata-to-writeObjectCode.patch @@ -0,0 +1,30 @@ +--- a/source/tools/pkgdata/pkgdata.cpp ++++ b/source/tools/pkgdata/pkgdata.cpp +@@ -769,14 +769,26 @@ + #ifdef CAN_WRITE_OBJ_CODE + /* Try to detect the arch type, use nullptr if unsuccessful */ + char optMatchArch[10] = { 0 }; + pkg_createOptMatchArch(optMatchArch); ++ ++ /* Determine the CPU architecture string for writeObjectCode. ++ * When using Clang on Windows, the _M_* macros reflect the ++ * target architecture set by the compiler driver. */ ++ const char *optCpuArch = nullptr; ++#if defined(_M_AMD64) ++ optCpuArch = "x64"; ++#elif defined(_M_ARM64) ++ optCpuArch = "arm64"; ++#elif defined(_M_IX86) ++ optCpuArch = "x86"; ++#endif + writeObjectCode( + datFileNamePath, + o->tmpDir, + o->entryName, + (optMatchArch[0] == 0 ? nullptr : optMatchArch), +- nullptr, ++ optCpuArch, + nullptr, + gencFilePath, + sizeof(gencFilePath), + true); diff --git a/ports/icu/patches/0006-Skip-pkgdata-link-step-when-cross-compiling.patch b/ports/icu/patches/0006-Skip-pkgdata-link-step-when-cross-compiling.patch new file mode 100644 index 00000000..a8bafb9b --- /dev/null +++ b/ports/icu/patches/0006-Skip-pkgdata-link-step-when-cross-compiling.patch @@ -0,0 +1,15 @@ +--- a/source/tools/pkgdata/pkgdata.cpp ++++ b/source/tools/pkgdata/pkgdata.cpp +@@ -1795,5 +1795,12 @@ + static int32_t pkg_createWindowsDLL(const char mode, const char *gencFilePath, UPKGOptions *o) { + int32_t result = 0; + char cmd[LARGE_BUFFER_MAX_SIZE]; ++ ++ /* When cross-compiling from a non-Windows host, the CMake build system ++ * links the data library itself; skip the link/lib step here. */ ++ const char *skipLink = getenv("ICU_SKIP_PKGDATA_LINK"); ++ if (skipLink && skipLink[0] == '1') ++ return 0; ++ + if (IN_STATIC_MODE(mode)) { + char staticLibFilePath[SMALL_BUFFER_MAX_SIZE] = ""; diff --git a/ports/icu/pkgconfig/debug/icu-i18n.pc b/ports/icu/pkgconfig/debug/icu-i18n.pc new file mode 100644 index 00000000..6bed5cae --- /dev/null +++ b/ports/icu/pkgconfig/debug/icu-i18n.pc @@ -0,0 +1,40 @@ +prefix=${pcfiledir}/../.. +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. + +# CFLAGS contains only anything end users should set +CFLAGS = +# CXXFLAGS contains only anything end users should set +CXXFLAGS = +# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h +DEFS = +exec_prefix = ${prefix} +#bindir = ${prefix}/../tools/icu/debug/bin +libdir = ${prefix}/lib +includedir = ${prefix}/../include +baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 +#datarootdir = ${prefix}/../share/icu +#datadir = ${datarootdir} +#sbindir = ${prefix}/../tools/icu/debug/sbin +#mandir = ${datarootdir}/man +#sysconfdir = ${prefix}/etc +UNICODE_VERSION=16.0 +ICUPREFIX=icu +ICULIBSUFFIX= +LIBICU=lib${ICUPREFIX} +#SHAREDLIBCFLAGS=-fPIC +pkglibdir=${libdir}/icu${ICULIBSUFFIX}/77.1 +#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/77.1 +ICUDATA_NAME = icudt76l +#ICUPKGDATA_DIR=${prefix}/lib +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode + +Version: 77.1 +Cflags: "-I${includedir}" +# end of icu.pc.in +Description: International Components for Unicode: Internationalization library +Name: icu-i18n +Requires.private: icu-uc +Libs: "-L${libdir}" -licuind diff --git a/ports/icu/pkgconfig/debug/icu-io.pc b/ports/icu/pkgconfig/debug/icu-io.pc new file mode 100644 index 00000000..b459d74b --- /dev/null +++ b/ports/icu/pkgconfig/debug/icu-io.pc @@ -0,0 +1,40 @@ +prefix=${pcfiledir}/../.. +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. + +# CFLAGS contains only anything end users should set +CFLAGS = +# CXXFLAGS contains only anything end users should set +CXXFLAGS = +# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h +DEFS = +exec_prefix = ${prefix} +#bindir = ${prefix}/../tools/icu/debug/bin +libdir = ${prefix}/lib +includedir = ${prefix}/../include +baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 +#datarootdir = ${prefix}/../share/icu +#datadir = ${datarootdir} +#sbindir = ${prefix}/../tools/icu/debug/sbin +#mandir = ${datarootdir}/man +#sysconfdir = ${prefix}/etc +UNICODE_VERSION=16.0 +ICUPREFIX=icu +ICULIBSUFFIX= +LIBICU=lib${ICUPREFIX} +#SHAREDLIBCFLAGS=-fPIC +pkglibdir=${libdir}/icu${ICULIBSUFFIX}/77.1 +#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/77.1 +ICUDATA_NAME = icudt76l +#ICUPKGDATA_DIR=${prefix}/lib +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode + +Version: 77.1 +Cflags: "-I${includedir}" +# end of icu.pc.in +Description: International Components for Unicode: Stream and I/O Library +Name: icu-io +Requires.private: icu-i18n +Libs: "-L${libdir}" -licuiod diff --git a/ports/icu/pkgconfig/debug/icu-uc.pc b/ports/icu/pkgconfig/debug/icu-uc.pc new file mode 100644 index 00000000..762eb288 --- /dev/null +++ b/ports/icu/pkgconfig/debug/icu-uc.pc @@ -0,0 +1,40 @@ +prefix=${pcfiledir}/../.. +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. + +# CFLAGS contains only anything end users should set +CFLAGS = +# CXXFLAGS contains only anything end users should set +CXXFLAGS = +# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h +DEFS = +exec_prefix = ${prefix} +#bindir = ${prefix}/../tools/icu/debug/bin +libdir = ${prefix}/lib +includedir = ${prefix}/../include +baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 +#datarootdir = ${prefix}/../share/icu +#datadir = ${datarootdir} +#sbindir = ${prefix}/../tools/icu/debug/sbin +#mandir = ${datarootdir}/man +#sysconfdir = ${prefix}/etc +UNICODE_VERSION=16.0 +ICUPREFIX=icu +ICULIBSUFFIX= +LIBICU=lib${ICUPREFIX} +#SHAREDLIBCFLAGS=-fPIC +pkglibdir=${libdir}/icu${ICULIBSUFFIX}/77.1 +#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/77.1 +ICUDATA_NAME = icudt76l +#ICUPKGDATA_DIR=${prefix}/lib +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode + +Version: 77.1 +Cflags: "-I${includedir}" +# end of icu.pc.in +Description: International Components for Unicode: Common and Data libraries +Name: icu-uc +Libs: "-L${libdir}" -licuucd +Libs.private: -licudtd ${baselibs} diff --git a/ports/icu/pkgconfig/release/icu-i18n.pc b/ports/icu/pkgconfig/release/icu-i18n.pc new file mode 100644 index 00000000..0609a1c9 --- /dev/null +++ b/ports/icu/pkgconfig/release/icu-i18n.pc @@ -0,0 +1,40 @@ +prefix=${pcfiledir}/../.. +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. + +# CFLAGS contains only anything end users should set +CFLAGS = +# CXXFLAGS contains only anything end users should set +CXXFLAGS = +# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h +DEFS = +exec_prefix = ${prefix} +#bindir = ${prefix}/tools/icu/bin +libdir = ${prefix}/lib +includedir = ${prefix}/include +baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 +#datarootdir = ${prefix}/share/icu +#datadir = ${datarootdir} +#sbindir = ${prefix}/tools/icu/sbin +#mandir = ${prefix}/share/icu +#sysconfdir = ${prefix}/etc +UNICODE_VERSION=16.0 +ICUPREFIX=icu +ICULIBSUFFIX= +LIBICU=lib${ICUPREFIX} +#SHAREDLIBCFLAGS=-fPIC +pkglibdir=${libdir}/icu${ICULIBSUFFIX}/77.1 +#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/77.1 +ICUDATA_NAME = icudt76l +#ICUPKGDATA_DIR=${prefix}/lib +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode + +Version: 77.1 +Cflags: "-I${includedir}" +# end of icu.pc.in +Description: International Components for Unicode: Internationalization library +Name: icu-i18n +Requires.private: icu-uc +Libs: "-L${libdir}" -licuin diff --git a/ports/icu/pkgconfig/release/icu-io.pc b/ports/icu/pkgconfig/release/icu-io.pc new file mode 100644 index 00000000..79d9ab66 --- /dev/null +++ b/ports/icu/pkgconfig/release/icu-io.pc @@ -0,0 +1,40 @@ +prefix=${pcfiledir}/../.. +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. + +# CFLAGS contains only anything end users should set +CFLAGS = +# CXXFLAGS contains only anything end users should set +CXXFLAGS = +# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h +DEFS = +exec_prefix = ${prefix} +#bindir = ${prefix}/tools/icu/bin +libdir = ${prefix}/lib +includedir = ${prefix}/include +baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 +#datarootdir = ${prefix}/share/icu +#datadir = ${datarootdir} +#sbindir = ${prefix}/tools/icu/sbin +#mandir = ${prefix}/share/icu +#sysconfdir = ${prefix}/etc +UNICODE_VERSION=16.0 +ICUPREFIX=icu +ICULIBSUFFIX= +LIBICU=lib${ICUPREFIX} +#SHAREDLIBCFLAGS=-fPIC +pkglibdir=${libdir}/icu${ICULIBSUFFIX}/77.1 +#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/77.1 +ICUDATA_NAME = icudt76l +#ICUPKGDATA_DIR=${prefix}/lib +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode + +Version: 77.1 +Cflags: "-I${includedir}" +# end of icu.pc.in +Description: International Components for Unicode: Stream and I/O Library +Name: icu-io +Requires.private: icu-i18n +Libs: "-L${libdir}" -licuio diff --git a/ports/icu/pkgconfig/release/icu-uc.pc b/ports/icu/pkgconfig/release/icu-uc.pc new file mode 100644 index 00000000..7f210c65 --- /dev/null +++ b/ports/icu/pkgconfig/release/icu-uc.pc @@ -0,0 +1,40 @@ +prefix=${pcfiledir}/../.. +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved. + +# CFLAGS contains only anything end users should set +CFLAGS = +# CXXFLAGS contains only anything end users should set +CXXFLAGS = +# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h +DEFS = +exec_prefix = ${prefix} +#bindir = ${prefix}/tools/icu/bin +libdir = ${prefix}/lib +includedir = ${prefix}/include +baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 +#datarootdir = ${prefix}/share/icu +#datadir = ${datarootdir} +#sbindir = ${prefix}/tools/icu/sbin +#mandir = ${prefix}/share/icu +#sysconfdir = ${prefix}/etc +UNICODE_VERSION=16.0 +ICUPREFIX=icu +ICULIBSUFFIX= +LIBICU=lib${ICUPREFIX} +#SHAREDLIBCFLAGS=-fPIC +pkglibdir=${libdir}/icu${ICULIBSUFFIX}/77.1 +#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/77.1 +ICUDATA_NAME = icudt76l +#ICUPKGDATA_DIR=${prefix}/lib +#ICUDATA_DIR=${pkgdatadir} +ICUDESC=International Components for Unicode + +Version: 77.1 +Cflags: "-I${includedir}" +# end of icu.pc.in +Description: International Components for Unicode: Common and Data libraries +Name: icu-uc +Libs: "-L${libdir}" -licuuc +Libs.private: -licudt ${baselibs} diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 27203e14..ef80e077 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -1,4 +1,4 @@ -set(VERSION_MAJOR 76) +set(VERSION_MAJOR 77) set(VERSION_MINOR 1) set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}") set(VERSION2 "${VERSION_MAJOR}_${VERSION_MINOR}") @@ -11,7 +11,7 @@ set(URLS "https://github.com/unicode-org/icu/releases/download/release-${VERSION vcpkg_download_distfile(ARCHIVE URLS ${URLS} FILENAME ${FILENAME} - SHA512 b702ab62fb37a1574d5f4a768326d0f8fa30d9db5b015605b5f8215b5d8547f83d84880c586d3dcc7b6c76f8d47ef34e04b0f51baa55908f737024dd79a42a6c + SHA512 a47d6d9c327d037a05ea43d1d1a06b2fd757cc02a94f7c1a238f35cfc3dfd4ab78d0612790f3a3cca0292c77412a9c2c15c8f24b718f79a857e007e66f07e7cd ) # Patches @@ -20,6 +20,14 @@ set(PATCHES ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Add-CMake-platform.patch # Patch specifically for vcpkg on top of above ${CMAKE_CURRENT_LIST_DIR}/patches/0002-Remove-install-suffix-on-Windows.patch + # Append CMAKE_EXECUTABLE_SUFFIX to tool paths for cross-compilation + ${CMAKE_CURRENT_LIST_DIR}/patches/0003-Append-CMAKE_EXECUTABLE_SUFFIX-to-tool-paths.patch + # Copy stubdata DLL to bin/ during cross-compilation (not just native Windows) + ${CMAKE_CURRENT_LIST_DIR}/patches/0004-Copy-stubdata-dll-to-bin-for-cross-compile.patch + # Pass optCpuArch to writeObjectCode to avoid nullptr dereference with clang + ${CMAKE_CURRENT_LIST_DIR}/patches/0005-Pass-optCpuArch-from-pkgdata-to-writeObjectCode.patch + # Allow overriding link.exe/LIB.exe via env vars for cross-compilation + ${CMAKE_CURRENT_LIST_DIR}/patches/0006-Skip-pkgdata-link-step-when-cross-compiling.patch ) # Extract archive @@ -51,6 +59,13 @@ else () set(ENABLE_TOOLS ON) endif () +# When cross-compiling for Windows from a non-Windows host, pkgdata.exe runs +# under Wine but cannot invoke link.exe/LIB.exe. The CMake build links the +# data library itself, so skip the redundant link step in pkgdata (patch 0006). +if (NOT VCPKG_HOST_IS_WINDOWS AND ENABLE_TOOLS) + set(ENV{ICU_SKIP_PKGDATA_LINK} 1) +endif () + vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH}/source OPTIONS @@ -61,6 +76,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ICU) vcpkg_fixup_pkgconfig() if (ENABLE_TOOLS) @@ -100,7 +116,10 @@ if (ENABLE_TOOLS) file(RENAME ${CURRENT_PACKAGES_DIR}/sbin/${tool}${TOOL_EXTENSION} ${CURRENT_PACKAGES_DIR}/tools/icu/${tool}${TOOL_EXTENSION}) endforeach() - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/icu) + # vcpkg_copy_tool_dependencies requires PowerShell, skip on non-Windows hosts + if (VCPKG_HOST_IS_WINDOWS) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/icu) + endif () endif () # Prepare distribution @@ -109,17 +128,12 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/sbin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/sbin) -# Merge cmake configs -file(COPY - DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu - PATTERN ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/*.cmake -) -file(COPY - DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu - PATTERN ${CURRENT_PACKAGES_DIR}/lib/cmake/*.cmake -) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +# Meson requires a pkgconfig file to properly build libraries with ICU +# The CMake here doesn't create one so just use a generated one +if (VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/release DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pkgconfig) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/debug DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME pkgconfig) +endif () file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu RENAME copyright) file(WRITE ${CURRENT_PACKAGES_DIR}/share/icu/version "${VERSION_MAJOR}.${VERSION_MINOR}.0") diff --git a/ports/icu/vcpkg.json b/ports/icu/vcpkg.json index c1ebb4eb..47e403b0 100644 --- a/ports/icu/vcpkg.json +++ b/ports/icu/vcpkg.json @@ -1,6 +1,7 @@ { "name": "icu", - "version": "76.1.0", + "version": "77.1.0", + "port-version": 1, "description": "ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.", "homepage": "http://site.icu-project.org", "license": "ICU", @@ -12,10 +13,6 @@ { "name": "vcpkg-cmake-config", "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true } ] } diff --git a/ports/lcms/patches/0001-Add-CMake-build.patch b/ports/lcms/patches/0001-Add-CMake-build.patch deleted file mode 100644 index aa98172c..00000000 --- a/ports/lcms/patches/0001-Add-CMake-build.patch +++ /dev/null @@ -1,115 +0,0 @@ -From ebc36b1283b5c9b5bd4b055665a020041cc7244e Mon Sep 17 00:00:00 2001 -From: Don -Date: Thu, 11 Nov 2021 14:31:22 -0800 -Subject: [PATCH] Add CMake build - ---- - CMakeLists.txt | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 96 insertions(+) - create mode 100644 CMakeLists.txt - -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..24c7457 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,96 @@ -+cmake_minimum_required(VERSION 3.15) -+ -+project(little-cms -+ VERSION 2.16.0 -+ LANGUAGES C -+) -+ -+include(CheckSymbolExists) -+include(GNUInstallDirs) -+ -+add_library(lcms2 "") -+target_sources(lcms2 PRIVATE -+ src/cmsalpha.c -+ src/cmscam02.c -+ src/cmscgats.c -+ src/cmscnvrt.c -+ src/cmserr.c -+ src/cmsgamma.c -+ src/cmsgmt.c -+ src/cmshalf.c -+ src/cmsintrp.c -+ src/cmsio0.c -+ src/cmsio1.c -+ src/cmslut.c -+ src/cmsmd5.c -+ src/cmsmtrx.c -+ src/cmsnamed.c -+ src/cmsopt.c -+ src/cmspack.c -+ src/cmspcs.c -+ src/cmsplugin.c -+ src/cmsps2.c -+ src/cmssamp.c -+ src/cmssm.c -+ src/cmstypes.c -+ src/cmsvirt.c -+ src/cmswtpnt.c -+ src/cmsxform.c -+) -+ -+set(lcms2_headers -+ ${CMAKE_CURRENT_LIST_DIR}/include/lcms2.h -+ ${CMAKE_CURRENT_LIST_DIR}/include/lcms2_plugin.h -+) -+set_target_properties(lcms2 PROPERTIES PUBLIC_HEADER "${lcms2_headers}") -+ -+target_include_directories(lcms2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include/) -+ -+find_library(LIBM_LIBRARY m) -+if (LIBM_LIBRARY) -+ target_link_libraries(lcms2 PRIVATE ${LIBM_LIBRARY}) -+endif () -+ -+find_package(Threads REQUIRED) -+target_compile_definitions(lcms2 PRIVATE HasTHREADS=1) -+target_link_libraries(lcms2 PRIVATE Threads::Threads) -+ -+check_symbol_exists(gmtime_r "time.h" HAVE_GMTIME_R) -+if (HAVE_GMTIME_R) -+ target_compile_definitions(lcms2 PRIVATE HAVE_GMTIME_R=1) -+endif () -+check_symbol_exists(gmtime_s "time.h" HAVE_GMTIME_S) -+if (HAVE_GMTIME_S) -+ target_compile_definitions(lcms2 PRIVATE HAVE_GMTIME_S=1) -+endif () -+ -+if (WIN32) -+ target_sources(lcms2 PRIVATE src/lcms2.def) -+ -+ if (BUILD_SHARED_LIBS) -+ target_compile_definitions(lcms2 PRIVATE CMS_DLL_BUILD) -+ target_compile_definitions(lcms2 PUBLIC CMS_DLL) -+ endif () -+endif () -+ -+install(TARGETS lcms2 -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -+ -+set(PACKAGE "lcms2") -+file(READ "${CMAKE_CURRENT_LIST_DIR}/configure" lcms2_configure) -+string(REGEX MATCH "PACKAGE_VERSION='(([0-9]+)\\.([0-9]+))'" _ ${lcms2_configure}) -+set(VERSION "${CMAKE_MATCH_1}") -+set(prefix "${CMAKE_INSTALL_PREFIX}") -+set(exec_prefix "\${prefix}") -+set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") -+set(includedir "\${prefix}/include") -+configure_file(lcms2.pc.in "${PROJECT_BINARY_DIR}/lcms2.pc" @ONLY) -+ -+install(FILES -+ ${PROJECT_BINARY_DIR}/lcms2.pc -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -+) --- -2.43.0.windows.1 - diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake deleted file mode 100644 index 4d487594..00000000 --- a/ports/lcms/portfile.cmake +++ /dev/null @@ -1,38 +0,0 @@ -set(VERSION 2.16) - -set(FILENAME "lcms2-${VERSION}.tar.gz") -set(URLS "https://github.com/mm2/Little-CMS/releases/download/lcms${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 638dd6ad6787456c8145510d18b2d0727bd0a446a13ac2934aabc9531d1156eca2a2c0fd780a453823fbd35a1895f9d8de5dc4b3cab505459dd3f0535b4e837d -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Add-CMake-build.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcms RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/lcms/version ${VERSION}) diff --git a/ports/lcms/vcpkg.json b/ports/lcms/vcpkg.json deleted file mode 100644 index 3538d1a9..00000000 --- a/ports/lcms/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "lcms", - "version": "2.16.0", - "description": "A free, open source, CMM engine. It provides fast transforms between ICC profiles.", - "homepage": "https://github.com/mm2/Little-CMS", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/libjpeg-turbo/patches/0001-Make-executables-conditional.patch b/ports/libjpeg-turbo/patches/0001-Make-executables-conditional.patch deleted file mode 100644 index f81c3d0b..00000000 --- a/ports/libjpeg-turbo/patches/0001-Make-executables-conditional.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 5d4828ca4a8d6b6982130168f0d726128b63939c Mon Sep 17 00:00:00 2001 -From: Don -Date: Tue, 5 Nov 2019 14:12:34 -0800 -Subject: [PATCH 1/2] Make executables conditional - -Adds an option ENABLE_EXECUTABLES which specifies whether executables should be built. ---- - CMakeLists.txt | 18 +++++++++++++++--- - sharedlib/CMakeLists.txt | 13 ++++++++----- - 2 files changed, 23 insertions(+), 8 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ff9c9c27..23e11f5e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -217,6 +217,8 @@ option(ENABLE_SHARED "Build shared libraries" TRUE) - boolean_number(ENABLE_SHARED) - option(ENABLE_STATIC "Build static libraries" TRUE) - boolean_number(ENABLE_STATIC) -+option(ENABLE_EXECUTABLES "Build executables" TRUE) -+boolean_number(ENABLE_EXECUTABLES) - option(REQUIRE_SIMD - "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" - FALSE) -@@ -721,6 +723,7 @@ if(WITH_TURBOJPEG) - LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}") - endif() - -+ if(ENABLE_EXECUTABLES) - add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c) - target_link_libraries(tjunittest turbojpeg) - -@@ -732,6 +735,7 @@ if(WITH_TURBOJPEG) - - add_executable(tjexample tjexample.c) - target_link_libraries(tjexample turbojpeg) -+ endif() - - add_custom_target(tjdoc COMMAND doxygen -s doxygen.config - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -@@ -755,6 +759,7 @@ if(WITH_TURBOJPEG) - set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg) - endif() - -+ if(ENABLE_EXECUTABLES) - add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c - md5/md5hl.c) - target_link_libraries(tjunittest-static turbojpeg-static) -@@ -764,6 +769,7 @@ if(WITH_TURBOJPEG) - if(UNIX) - target_link_libraries(tjbench-static m) - endif() -+ endif() - endif() - endif() - -@@ -773,7 +779,7 @@ endif() - set(CDJPEG_COMPILE_FLAGS - "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}") - --if(ENABLE_STATIC) -+if(ENABLE_STATIC AND ENABLE_EXECUTABLES) - # Compile a separate version of these source files with 12-bit and 16-bit - # data precision. - add_library(cjpeg12-static OBJECT rdgif.c rdppm.c) -@@ -812,9 +818,11 @@ if(ENABLE_STATIC) - target_link_libraries(example-static jpeg-static) - endif() - -+if(ENABLE_EXECUTABLES) - add_executable(rdjpgcom rdjpgcom.c) - - add_executable(wrjpgcom wrjpgcom.c) -+endif() - - - ############################################################################### -@@ -1730,8 +1738,10 @@ if(WITH_TURBOJPEG) - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) -+ if(ENABLE_EXECUTABLES) - install(TARGETS tjbench - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) -+ endif() - if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND - CMAKE_C_LINKER_SUPPORTS_PDB) - install(FILES "$" -@@ -1742,7 +1752,7 @@ if(WITH_TURBOJPEG) - install(TARGETS turbojpeg-static EXPORT ${CMAKE_PROJECT_NAME}Targets - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib) -- if(NOT ENABLE_SHARED) -+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES) - if(GENERATOR_IS_MULTI_CONFIG) - set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") - else() -@@ -1760,7 +1770,7 @@ if(ENABLE_STATIC) - install(TARGETS jpeg-static EXPORT ${CMAKE_PROJECT_NAME}Targets - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib) -- if(NOT ENABLE_SHARED) -+ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES) - if(GENERATOR_IS_MULTI_CONFIG) - set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") - else() -@@ -1775,8 +1785,10 @@ if(ENABLE_STATIC) - endif() - endif() - -+if(ENABLE_EXECUTABLES) - install(TARGETS rdjpgcom wrjpgcom - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) -+endif() - - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg - ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.c -diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt -index eaed9e95..322e67b2 100644 ---- a/sharedlib/CMakeLists.txt -+++ b/sharedlib/CMakeLists.txt -@@ -74,6 +74,13 @@ elseif(MINGW) - set_target_properties(jpeg PROPERTIES SUFFIX -${SO_MAJOR_VERSION}.dll) - endif() - -+install(TARGETS jpeg EXPORT ${CMAKE_PROJECT_NAME}Targets -+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) -+ -+if(ENABLE_EXECUTABLES) - if(WIN32) - set(USE_SETMODE "-DUSE_SETMODE") - endif() -@@ -118,13 +125,9 @@ target_link_libraries(example jpeg) - add_executable(jcstest ../jcstest.c) - target_link_libraries(jcstest jpeg) - --install(TARGETS jpeg EXPORT ${CMAKE_PROJECT_NAME}Targets -- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) - install(TARGETS cjpeg djpeg jpegtran - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) -+endif() - if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND - CMAKE_C_LINKER_SUPPORTS_PDB) - install(FILES "$" --- -2.45.1.windows.1 diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake deleted file mode 100644 index 555612f6..00000000 --- a/ports/libjpeg-turbo/portfile.cmake +++ /dev/null @@ -1,76 +0,0 @@ -include(${CMAKE_CURRENT_LIST_DIR}/vcpkg_acquire_gnuwin32_program.cmake) - -set(VERSION 3.0.3) - -set(FILENAME "libjpeg-turbo-${VERSION}.tar.gz") -set(URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 7c3a6660e7a54527eaa40929f5cc3d519842ffb7e961c32630ae7232b71ecaa19e89dbf5600c61038f0c5db289b607c2316fe9b6b03d482d770bcac29288d129 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Make-executables-conditional.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Find NASM and add to the path -vcpkg_find_acquire_program(NASM) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -vcpkg_add_to_path(${NASM_EXE_PATH}) - -# Find gnutools and add to the path -vcpkg_acquire_gnuwin32_program(GREP) -vcpkg_acquire_gnuwin32_program(SED) -get_filename_component(GREP_EXE_PATH ${GREP} DIRECTORY) -get_filename_component(SED_EXE_PATH ${SED} DIRECTORY) -vcpkg_add_to_path(${GREP_EXE_PATH}) -vcpkg_add_to_path(${SED_EXE_PATH}) - -# Run CMake build -set(BUILD_OPTIONS - -DENABLE_EXECUTABLES=OFF - -DWITH_SIMD=ON - -DWITH_TURBOJPEG=OFF -) - -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ENABLE_SHARED) -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ENABLE_STATIC) - -if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME MATCHES "^Windows") - string(COMPARE EQUAL ${VCPKG_CRT_LINKAGE} "dynamic" WITH_CRT_DLL) - - list(APPEND BUILD_OPTIONS -DWITH_CRT_DLL=${WITH_CRT_DLL}) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} - -DENABLE_STATIC=${ENABLE_STATIC} - -DENABLE_SHARED=${ENABLE_SHARED} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libjpeg-turbo) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/version ${VERSION}) diff --git a/ports/libjpeg-turbo/vcpkg.json b/ports/libjpeg-turbo/vcpkg.json deleted file mode 100644 index d35f76ca..00000000 --- a/ports/libjpeg-turbo/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "libjpeg-turbo", - "version": "3.0.3", - "description": "A JPEG image codec that uses SIMD instructions (MMX, SSE2, AVX2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.", - "homepage": "http://libjpeg-turbo.virtualgl.org", - "license": "BSD-3-Clause", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/libjpeg-turbo/vcpkg_acquire_gnuwin32_program.cmake b/ports/libjpeg-turbo/vcpkg_acquire_gnuwin32_program.cmake deleted file mode 100644 index 29c520ac..00000000 --- a/ports/libjpeg-turbo/vcpkg_acquire_gnuwin32_program.cmake +++ /dev/null @@ -1,82 +0,0 @@ -## # vcpkg_acquire_gnuwin32_program -## -## Downloads prebuilt binaries for gnuwin32 tools. -## -## ## Usage -## ```cmake -## vcpkg_acquire_gnuwin32_program() -## ``` -## -## ## Parameters -## ### VAR -## This variable specifies both the program to be acquired as well as the out parameter that will be set to the path of the program executable. -## -## ## Notes -## The current list of programs includes: -## -## - GREP -## - SED -function(vcpkg_acquire_gnuwin32_program VAR) - set(EXPANDED_VAR ${${VAR}}) - if (EXPANDED_VAR) - return() - endif() - - if (VAR MATCHES "GREP") - set(PROGNAME grep) - set(URL "http://downloads.sourceforge.net/gnuwin32/grep-2.5.4-bin.zip") - set(ARCHIVE "grep-2.5.4-bin.zip") - set(HASH 8c1304e6dd4d5d3ab60206dfc5775845cfefd79157e41d4cdba3b20f76543c8d0118a23e792c1e6fcb84f4cc35fc03e72e67fbb35ab843eb27c309c2fbb024a6) - set(DEP_URL "http://downloads.sourceforge.net/gnuwin32/grep-2.5.4-dep.zip") - set(DEP_ARCHIVE "grep-2.5.4-dep.zip") - set(DEP_HASH 2608d02297a84a103d1ca3243990f8714310863f9e3ba0beeef20527ffe67678d01f3deea98b5c3e0142eef2dbcd340fdac263727f8b940932632919be515cca) - elseif (VAR MATCHES "SED") - set(PROGNAME sed) - set(URL "http://downloads.sourceforge.net/gnuwin32/sed-4.2.1-bin.zip") - set(ARCHIVE "sed-4.2.1-bin.zip") - set(HASH 3a5c87d21f1faee7579f97ddcdfeb87fdd3389fafd73ceef81299f9e2c44d63fca74a9ab656f2db1a95491aca63965116d51361b9630d00fa39f76bd990d2204) - set(DEP_URL "http://downloads.sourceforge.net/gnuwin32/sed-4.2.1-dep.zip") - set(DEP_ARCHIVE "sed-4.2.1-dep.zip") - set(DEP_HASH c8d222410011e75744ed1a3c51460200f9b863e3562ee3c506cca06a5e708d04fb9ec32e8d2427665d61b6724ca594deb9407733b15b9ba48a16838d7c7c4ddc) - else () - message(FATAL "unknown tool ${VAR} -- unable to acquire.") - endif() - - macro(do_find) - find_program(${VAR} ${PROGNAME} PATHS ${DOWNLOADS}/tools/${PROGNAME}/bin) - endmacro() - - do_find() - if("${${VAR}}" MATCHES "-NOTFOUND") - file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}) - - # Get distribution - vcpkg_download_distfile(ARCHIVE_PATH - URLS ${URL} - SHA512 ${HASH} - FILENAME ${ARCHIVE} - ) - - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} - WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} - ) - - # Get dependencies - # WinGNU files do not distribute dependenices in the archive - vcpkg_download_distfile(DEP_ARCHIVE_PATH - URLS ${DEP_URL} - SHA512 ${DEP_HASH} - FILENAME ${DEP_ARCHIVE} - ) - - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DEP_ARCHIVE_PATH} - WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} - ) - - do_find() - endif() - - set(${VAR} "${${VAR}}" PARENT_SCOPE) -endfunction() diff --git a/ports/libjxl/portfile.cmake b/ports/libjxl/portfile.cmake deleted file mode 100644 index 4d4e6af9..00000000 --- a/ports/libjxl/portfile.cmake +++ /dev/null @@ -1,58 +0,0 @@ -set(VERSION 0.11.0) - -set(FILENAME "libjxl-${VERSION}.zip") -set(URLS "https://github.com/libjxl/libjxl/archive/v${VERSION}.zip") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 1dace0c304213736a2f94036f8a2ce408dd19d3e7f1e825d21de0a465e5014abeaecb2192d2b2e5367a29930275b4a0a48ef0a3e29722f85d1a3390fde201699 -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - -DJPEGXL_ENABLE_FUZZERS=OFF - -DJPEGXL_ENABLE_DEVTOOLS=OFF - -DJPEGXL_ENABLE_TOOLS=OFF - -DJPEGXL_ENABLE_MANPAGES=OFF - -DJPEGXL_ENABLE_BENCHMARK=OFF - -DJPEGXL_ENABLE_EXAMPLES=OFF - -DJPEGXL_ENABLE_JNI=OFF - -DJPEGXL_ENABLE_SJPEG=OFF - -DJPEGXL_ENABLE_OPENEXR=OFF - -DJPEGXL_ENABLE_SKCMS=OFF - -DJPEGXL_ENABLE_TCMALLOC=OFF - - -DJPEGXL_FORCE_SYSTEM_BROTLI=ON - -DJPEGXL_FORCE_SYSTEM_HWY=ON - -DJPEGXL_FORCE_SYSTEM_LCMS2=ON - - -DBUILD_TESTING=OFF -) - -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static JPEGXL_STATIC) - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} - -DJPEGXL_STATIC=${JPEGXL_STATIC} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libjxl RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libjxl/version ${VERSION}) diff --git a/ports/libjxl/vcpkg.json b/ports/libjxl/vcpkg.json deleted file mode 100644 index 73c3236f..00000000 --- a/ports/libjxl/vcpkg.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "libjxl", - "version": "0.11.0", - "description": "libjxl is a reference implementation of JPEG XL (encoder and decoder).", - "homepage": "https://github.com/libjxl/libjxl", - "license": "BSD-3-Clause", - "dependencies": [ - "brotli", - "highway", - "lcms", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/libpng/patches/0001-Skip-install-symlink.patch b/ports/libpng/patches/0001-Skip-install-symlink.patch deleted file mode 100644 index 26bc29ad..00000000 --- a/ports/libpng/patches/0001-Skip-install-symlink.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6f10db2419e27a94fcf7ae3b6820b57a774273bd Mon Sep 17 00:00:00 2001 -From: Don -Date: Thu, 3 Jan 2019 16:53:04 -0800 -Subject: [PATCH 1/3] Skip install symlink - -Avoid using symlinks on Windows. ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 16cc2617d..e1b3bee1f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1069,7 +1069,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -- if(PNG_SHARED) -+ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK) - # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin - if(NOT WIN32 OR CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png_shared) -@@ -1078,7 +1078,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - endif() - endif() - -- if(PNG_STATIC) -+ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK) - if(NOT WIN32 OR CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) - install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} --- -2.46.0.windows.1 diff --git a/ports/libpng/patches/0002-Do-not-append-static-to-library-name.patch b/ports/libpng/patches/0002-Do-not-append-static-to-library-name.patch deleted file mode 100644 index 979cb41e..00000000 --- a/ports/libpng/patches/0002-Do-not-append-static-to-library-name.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ec8dc64f101aadd6eda58fe654bf19ff39cf612c Mon Sep 17 00:00:00 2001 -From: Don -Date: Thu, 3 Jan 2019 16:54:07 -0800 -Subject: [PATCH 2/3] Do not append static to library name - -On Windows a static lib will have _static appended. In vcpkg only a shared or static library is created so remove this behavior. ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e1b3bee1f..4857ec8d4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -683,7 +683,7 @@ else() - # We also need to use a custom suffix, in order to distinguish between the - # shared import library name and the static library name. - set(PNG_SHARED_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}") -- set(PNG_STATIC_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}_static") -+ set(PNG_STATIC_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}") - endif() - - if(PNG_SHARED) --- -2.46.0.windows.1 diff --git a/ports/libpng/patches/0003-Fix-pkgconfig-on-Windows.patch b/ports/libpng/patches/0003-Fix-pkgconfig-on-Windows.patch deleted file mode 100644 index ce8d523c..00000000 --- a/ports/libpng/patches/0003-Fix-pkgconfig-on-Windows.patch +++ /dev/null @@ -1,79 +0,0 @@ -From a92048afeed3831a3d7916b1957da4de8cdcde94 Mon Sep 17 00:00:00 2001 -From: Don -Date: Tue, 30 Nov 2021 10:04:36 -0800 -Subject: [PATCH 3/3] Fix pkgconfig on Windows - ---- - CMakeLists.txt | 44 +++++++++++++++++++++++++++----------------- - 1 file changed, 27 insertions(+), 17 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4857ec8d4..4c282ea9f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1045,21 +1045,31 @@ endif() - # Only do this on Windows for Cygwin - the files don't make much sense - # outside of a UNIX look-alike. - if(NOT WIN32 OR CYGWIN OR MINGW) -- set(prefix ${CMAKE_INSTALL_PREFIX}) -- set(exec_prefix ${CMAKE_INSTALL_PREFIX}) -- set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) -- set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) -- set(LIBS "-lz -lm") -- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in -- ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc -- @ONLY) -- create_symlink(libpng.pc FILE libpng${PNGLIB_ABI_VERSION}.pc) -- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in -- ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config -- @ONLY) -- create_symlink(libpng-config FILE libpng${PNGLIB_ABI_VERSION}-config) -+ set(LIBS "-lz") -+ if(M_LIBRARY) -+ string(APPEND LIBS " -lm") -+ endif() -+else() -+ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(LIBS "-lzlibd") -+ else() -+ set(LIBS "-lzlib") -+ endif() - endif() - -+set(prefix ${CMAKE_INSTALL_PREFIX}) -+set(exec_prefix ${CMAKE_INSTALL_PREFIX}) -+set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) -+set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) -+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in -+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc -+ @ONLY) -+create_symlink(libpng.pc FILE libpng${PNGLIB_ABI_VERSION}.pc) -+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in -+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config -+ @ONLY) -+create_symlink(libpng-config FILE libpng${PNGLIB_ABI_VERSION}-config) -+ - # Install. - if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - install(TARGETS ${PNG_LIBRARY_TARGETS} -@@ -1113,14 +1123,14 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) - DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) - install(FILES png.5 - DESTINATION ${CMAKE_INSTALL_MANDIR}/man5) -+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - # Install the pkg-config files. - if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config - DESTINATION ${CMAKE_INSTALL_BINDIR}) -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config - DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() --- -2.46.0.windows.1 diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake deleted file mode 100644 index 34f4dcaf..00000000 --- a/ports/libpng/portfile.cmake +++ /dev/null @@ -1,61 +0,0 @@ -set(VERSION 1.6.44) - -set(FILENAME "libpng-${VERSION}.tar.xz") -set(URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 bbd3e5e68d8b6fe3d85e59ca0babe8b522c19cac4b6ce0fcf21516cda7120b642be611eb1eaa565b7eabbacd22606593619aabd227b43a36f1efc707e7e11851 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Skip-install-symlink.patch - ${CMAKE_CURRENT_LIST_DIR}/patches/0002-Do-not-append-static-to-library-name.patch - ${CMAKE_CURRENT_LIST_DIR}/patches/0003-Fix-pkgconfig-on-Windows.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(PNG_STATIC_LIBS OFF) - set(PNG_SHARED_LIBS ON) -else() - set(PNG_STATIC_LIBS ON) - set(PNG_SHARED_LIBS OFF) -endif() - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DPNG_DEBUG_POSTFIX= - -DPNG_STATIC=${PNG_STATIC_LIBS} - -DPNG_SHARED=${PNG_SHARED_LIBS} - -DPNG_TESTS=OFF - -DSKIP_INSTALL_PROGRAMS=ON - -DSKIP_INSTALL_EXECUTABLES=ON - -DSKIP_INSTALL_SYMLINK=ON - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/PNG) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libpng/version ${VERSION}) diff --git a/ports/libpng/vcpkg.json b/ports/libpng/vcpkg.json deleted file mode 100644 index 8f8bd47a..00000000 --- a/ports/libpng/vcpkg.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "libpng", - "version": "1.6.44", - "description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.", - "homepage": "ttp://www.libpng.org/pub/png/libpng.html", - "license": "libpng-2.0", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - }, - "zlib" - ] -} diff --git a/ports/libpsl/build/config.h.in b/ports/libpsl/build/config.h.in deleted file mode 100644 index 1a46e47d..00000000 --- a/ports/libpsl/build/config.h.in +++ /dev/null @@ -1,160 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if using 'alloca.c'. */ -#cmakedefine C_ALLOCA - -/* Generate built-in PSL data */ -#cmakedefine ENABLE_BUILTIN @ENABLE_BUILTIN@ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#cmakedefine ENABLE_NLS - -/* Define to 1 if this is a fuzzing build */ -#cmakedefine FUZZING - -/* Define to 1 if you have 'alloca', as a function or macro. */ -#cmakedefine HAVE_ALLOCA @HAVE_ALLOCA@ - -/* Define to 1 if works. */ -#cmakedefine HAVE_ALLOCA_H @HAVE_ALLOCA_H@ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -#cmakedefine HAVE_CFLOCALECOPYPREFERREDLANGUAGES - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE - -/* Define to 1 if you have the `clock_gettime' function. */ -#cmakedefine HAVE_CLOCK_GETTIME @HAVE_CLOCK_GETTIME@ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#cmakedefine HAVE_DCGETTEXT - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#cmakedefine HAVE_DIRENT_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H - -/* Define to 1 if you have the `fmemopen' function. */ -#cmakedefine HAVE_FMEMOPEN @HAVE_FMEMOPEN@ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#cmakedefine HAVE_GETTEXT - -/* Define if you have the iconv() function and it works. */ -#cmakedefine HAVE_ICONV - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#cmakedefine HAVE_NDIR_H - -/* Define to 1 if you have the `nl_langinfo' function. */ -#cmakedefine HAVE_NL_LANGINFO @HAVE_NL_LANGINFO@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDIO_H @HAVE_STDIO_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ - -/* Define to 1 if you have the `strndup' function. */ -#cmakedefine HAVE_STRNDUP @HAVE_STRNDUP@ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#cmakedefine HAVE_SYS_DIR_H - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#cmakedefine HAVE_SYS_NDIR_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#cmakedefine HAVE_VISIBILITY - -/* Define as const if the declaration of iconv() needs const. */ -#cmakedefine ICONV_CONST - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#cmakedefine LT_OBJDIR - -/* Define to the address where bug reports for this package should be sent. */ -#cmakedefine PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#cmakedefine PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#cmakedefine PACKAGE_URL - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#cmakedefine STACK_DIRECTION - -/* Define to 1 if all of the C90 standard headers exist (not just the ones - required in a freestanding environment). This macro is provided for - backward compatibility; new code need not use it. */ -#cmakedefine STDC_HEADERS - -/* generate PSL data using libicu */ -#cmakedefine WITH_LIBICU @WITH_LIBICU@ - -/* generate PSL data using libidn */ -#cmakedefine WITH_LIBIDN @WITH_LIBIDN@ - -/* generate PSL data using libidn2 */ -#cmakedefine WITH_LIBIDN2 @WITH_LIBIDN2@ - -/* Number of bits in a file offset, on hosts where this is settable. */ -#cmakedefine _FILE_OFFSET_BITS - -/* Define for large files, on AIX-style hosts. */ -#cmakedefine _LARGE_FILES - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `unsigned int' if does not define. */ -#cmakedefine size_t diff --git a/ports/libpsl/patches/0001-Add-CMake-platform.patch b/ports/libpsl/patches/0001-Add-CMake-platform.patch deleted file mode 100644 index 65e63677..00000000 --- a/ports/libpsl/patches/0001-Add-CMake-platform.patch +++ /dev/null @@ -1,142 +0,0 @@ -From b1f91519a81a81bf673e507fbaec61ba98f924c8 Mon Sep 17 00:00:00 2001 -From: Don -Date: Tue, 29 Mar 2022 16:37:06 -0700 -Subject: [PATCH] Add CMake platform - -This mirrors the meson build files as closely as possible. It ignores options that aren't supported like non-ICU backends. ---- - CMakeLists.txt | 67 +++++++++++++++++ - include/CMakeLists.txt | 15 ++++ - src/CMakeLists.txt | 23 ++++++ - 3 files changed, 265 insertions(+) - create mode 100644 CMakeLists.txt - create mode 100644 config.h.in - create mode 100644 include/CMakeLists.txt - create mode 100644 src/CMakeLists.txt - -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..5fd5976 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,67 @@ -+cmake_minimum_required(VERSION 3.13) -+project( -+ psl -+ VERSION 0.21.2 -+ LANGUAGES C -+) -+ -+set(PSL_SOURCE_PATH -+ "" -+ CACHE STRING "Path to the Public Suffix List" -+) -+ -+include(CheckIncludeFile) -+include(CheckFunctionExists) -+include(CheckSymbolExists) -+include(GNUInstallDirs) -+ -+add_library(psl) -+ -+find_package(ICU 59.1 REQUIRED COMPONENTS uc) -+target_link_libraries(psl PRIVATE ICU::uc) -+ -+if (WIN32) -+ target_link_libraries(psl PRIVATE ws2_32) -+endif () -+ -+# Config file -+set(PACKAGE_VERSION ${PROJECT_VERSION}) -+set(ENABLE_BUILTIN ON) -+set(WITH_LIBICU ON) -+check_include_file("alloca.h" HAVE_ALLOCA_H) -+check_include_file("inttypes.h" HAVE_INTTYPES_H) -+check_include_file("stdint.h" HAVE_STDINT_H) -+check_include_file("stdio.h" HAVE_STDIO_H) -+check_include_file("stdlib.h" HAVE_STDLIB_H) -+check_include_file("string.h" HAVE_STRING_H) -+check_include_file("strings.h" HAVE_STRINGS_H) -+check_include_file("sys/stat.h" HAVE_SYS_STAT_H) -+check_include_file("sys/types.h" HAVE_SYS_TYPES_H) -+check_include_file("unistd.h" HAVE_UNISTD_H) -+ -+check_symbol_exists("alloca" "alloca.h" HAVE_ALLOCA) -+check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME) -+check_symbol_exists("fmemopen" "stdio.h" HAVE_FMEMOPEN) -+check_symbol_exists("nl_langinfo" "langinfo.h" HAVE_NL_LANGINFO) -+check_symbol_exists("strndup" "string.h" HAVE_STRNDUP) -+ -+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -+target_include_directories(psl PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -+ -+# MSVC -+if (MSVC) -+ target_compile_definitions(psl PRIVATE _CRT_SECURE_NO_WARNINGS) -+ -+ check_symbol_exists("snprintf" "stdio.h" HAVE_SNPRINTF) -+ if (NOT HAVE_SNPRINTF) -+ check_symbol_exists("_snprintf" "stdio.h" HAVE__SNPRINTF) -+ if (HAVE__SNPRINTF) -+ target_compile_definitions(psl PRIVATE "snprintf=_snprintf") -+ endif () -+ endif () -+ # Doing check_symbol_exists for _alloca fails so just set the value -+ target_compile_definitions(psl PRIVATE "alloca=_alloca") -+endif () -+ -+add_subdirectory(include) -+add_subdirectory(src) -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -new file mode 100644 -index 0000000..a6e9402 ---- /dev/null -+++ b/include/CMakeLists.txt -@@ -0,0 +1,15 @@ -+set(LIBPSL_VERSION ${PROJECT_VERSION}) -+set(LIBPSL_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) -+set(LIBPSL_VERSION_MINOR ${PROJECT_VERSION_MINOR}) -+set(LIBPSL_VERSION_PATCH ${PROJECT_VERSION_PATCH}) -+ -+math(EXPR LIBPSL_VERSION_NUMBER -+ "(${PROJECT_VERSION_MAJOR} << 16) + (${PROJECT_VERSION_MINOR} << 8) + (${PROJECT_VERSION_PATCH})" -+ OUTPUT_FORMAT HEXADECIMAL -+) -+ -+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpsl.h.in ${CMAKE_CURRENT_BINARY_DIR}/libpsl.h) -+ -+target_include_directories(psl PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -+ -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpsl.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -new file mode 100644 -index 0000000..e26d18f ---- /dev/null -+++ b/src/CMakeLists.txt -@@ -0,0 +1,23 @@ -+find_package(Python3 COMPONENTS Interpreter) -+ -+add_custom_command( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/suffixes_dafsa.h -+ DEPENDS ${PSL_SOURCE_PATH}/public_suffix_list.dat -+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/psl-make-dafsa --output-format=cxx+ -+ ${PSL_SOURCE_PATH}/public_suffix_list.dat ${CMAKE_CURRENT_BINARY_DIR}/suffixes_dafsa.h -+ VERBATIM -+) -+ -+add_custom_target(generate-dafsa DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/suffixes_dafsa.h) -+ -+target_sources(psl PRIVATE lookup_string_in_fixed_set.c psl.c) -+target_include_directories(psl PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -+target_compile_definitions(psl PRIVATE "HAVE_CONFIG_H" "BUILDING_PSL") -+add_dependencies(psl generate-dafsa) -+ -+install( -+ TARGETS psl -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+) --- -2.44.0.windows.1 - diff --git a/ports/libpsl/portfile.cmake b/ports/libpsl/portfile.cmake deleted file mode 100644 index 1c227ae2..00000000 --- a/ports/libpsl/portfile.cmake +++ /dev/null @@ -1,53 +0,0 @@ -include(${CMAKE_CURRENT_LIST_DIR}/psl.cmake) - -set(VERSION 0.21.5) - -set(FILENAME "libpsl-${VERSION}.tar.gz") -set(URLS "https://github.com/rockdaboot/libpsl/releases/download/${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 c14d575cecc0f1693894dd79565b6b9220084ddfa43b908a1cefe16d147cdd5ec47796eb0c2135e2f829a951abaf39d8a371ab5c1352f57b36e610e25adf91f5 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Add-CMake-platform.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Replace the config.h.in found in the release distribution -file(COPY ${CMAKE_CURRENT_LIST_DIR}/build/config.h.in DESTINATION ${SOURCE_PATH}) - -# Install Python -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -vcpkg_add_to_path(${PYTHON3_EXE_PATH}) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DPSL_SOURCE_PATH=${PSL_SOURCE_PATH} - -DLIBPSL_VERSION=${VERSION} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpsl RENAME copyright) -file(INSTALL ${SOURCE_PATH}/src/LICENSE.chromium DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpsl RENAME copyright-chromium) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libpsl/version ${VERSION}) diff --git a/ports/libpsl/psl.cmake b/ports/libpsl/psl.cmake deleted file mode 100644 index 2ffcfad0..00000000 --- a/ports/libpsl/psl.cmake +++ /dev/null @@ -1,12 +0,0 @@ -# Download PSL file -# Up to date as of 2024-08-13 -vcpkg_from_github( - OUT_SOURCE_PATH PSL_SOURCE_PATH - REPO publicsuffix/list - REF 6d6c3c973e73d1da8d1f2b9856e2e6d87c381cac - SHA512 be0d200273b847878aa77c2a9699a0431a1e91b0a7af683aada95ca6dabf2106b4277113972e22ac8a03087af6017b2d29d1317d1eb87f71af079ee5265cadd7 - HEAD_REF master -) - -file(INSTALL ${PSL_SOURCE_PATH}/public_suffix_list.dat DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpsl) -file(INSTALL ${PSL_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpsl RENAME copyright-psl) diff --git a/ports/libpsl/vcpkg.json b/ports/libpsl/vcpkg.json deleted file mode 100644 index 481514b5..00000000 --- a/ports/libpsl/vcpkg.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "libpsl", - "version": "0.21.5", - "description": "A library to handle Public Suffix Lists", - "homepage": "https://github.com/rockdaboot/libpsl", - "license": "MIT", - "dependencies": [ - { - "name": "icu", - "platform": "!linux" - }, - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/libressl/patches/0001-Disable-additional-warnings-for-Visual-Studio.patch b/ports/libressl/patches/0001-Disable-additional-warnings-for-Visual-Studio.patch deleted file mode 100644 index cca41e44..00000000 --- a/ports/libressl/patches/0001-Disable-additional-warnings-for-Visual-Studio.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 50b3c848f512242c86b883110fc7f2e4d5628138 Mon Sep 17 00:00:00 2001 -From: Don -Date: Wed, 24 Apr 2019 13:48:58 -0700 -Subject: [PATCH 1/3] Disable additional warnings for Visual Studio - -Disabling C4464, C4668 and C4820. ---- - CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c3d0d4..636266e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -170,7 +170,12 @@ if(MSVC) - "C4267" # 'var' : conversion from 'size_t' to 'type', - # possible loss of data - "C4389" # 'operator' : signed/unsigned mismatch -+ "C4464" # A #include directive has a path that includes a '..' -+ # parent directory specifier. -+ "C4668" # 'symbol' is not defined as a preprocessor macro, -+ # replacing with '0' for 'directives' - "C4706" # assignment within conditional expression -+ "C4820" # bytes' bytes padding added after construct 'member_name' - "C4996" # The POSIX name for this item is deprecated. - # Instead, use the ISO C and C++ conformant name - ) --- -2.47.0.windows.1 - diff --git a/ports/libressl/portfile.cmake b/ports/libressl/portfile.cmake deleted file mode 100644 index a1424033..00000000 --- a/ports/libressl/portfile.cmake +++ /dev/null @@ -1,71 +0,0 @@ -set(VERSION 4.0.0) - -set(FILENAME "libressl-${VERSION}.tar.gz") -set(URLS "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 b5ec6d1f4e3842ecb487f9a67d86db658d05cbe8cd3fcba61172affa8c65c5d0823aa244065a7233f06c669d04a5a36517c02a2d99d2f2da3c4df729ac243b37 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Disable-additional-warnings-for-Visual-Studio.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -if (tools IN_LIST FEATURES) - message(STATUS "Enabling tools") - set(LIBRESSL_APPS ON) -else () - set(LIBRESSL_APPS OFF) -endif () - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DLIBRESSL_TESTS=OFF - OPTIONS_RELEASE - -DLIBRESSL_APPS=${LIBRESSL_APPS} - OPTIONS_DEBUG - -DLIBRESSL_APPS=OFF -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/LibreSSL) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -if (tools IN_LIST FEATURES) - vcpkg_copy_tools(TOOL_NAMES openssl ocspcheck AUTO_CLEAN) -else () - # Config and pem files are not installed without the apps - file( - INSTALL - ${SOURCE_PATH}/cert.pem - ${SOURCE_PATH}/openssl.cnf - ${SOURCE_PATH}/x509v3.cnf - DESTINATION ${CURRENT_PACKAGES_DIR}/etc/ssl - ) -endif () - -# Empty directory created during install to house certificates -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc/ssl/certs) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc/ssl/certs) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libressl RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libressl/version ${VERSION}) diff --git a/ports/libressl/vcpkg.json b/ports/libressl/vcpkg.json deleted file mode 100644 index 060bf487..00000000 --- a/ports/libressl/vcpkg.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "libressl", - "version": "4.0.0", - "description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.", - "homepage": "https://www.libressl.org", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ], - "features": { - "tools": { - "description": "Build openssl and ocspcheck executables." - } - } -} diff --git a/ports/libwebp/patches/0001-Add-declspec-for-exporting-as-a-shared-library.patch b/ports/libwebp/patches/0001-Add-declspec-for-exporting-as-a-shared-library.patch deleted file mode 100644 index 0c58c52d..00000000 --- a/ports/libwebp/patches/0001-Add-declspec-for-exporting-as-a-shared-library.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 94db0c93a2d3c9ea0f46de1d67b9cb6281084085 Mon Sep 17 00:00:00 2001 -From: Don -Date: Mon, 23 Apr 2018 18:49:42 -0700 -Subject: [PATCH] Add declspec for exporting as a shared library - -This adds a default declaration of __declspec to WEBP_EXTERN. ---- - src/webp/types.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/webp/types.h b/src/webp/types.h -index 9c17edec..24cb24f3 100644 ---- a/src/webp/types.h -+++ b/src/webp/types.h -@@ -59,10 +59,14 @@ typedef long long int int64_t; - #endif /* defined(WEBP_ENABLE_NODISCARD) && WEBP_ENABLE_NODISCARD */ - #endif /* WEBP_NODISCARD */ - -+#ifndef __has_declspec_attribute -+#define __has_declspec_attribute(x) 0 -+#endif -+ - #ifndef WEBP_EXTERN - // This explicitly marks library functions and allows for changing the - // signature for e.g., Windows DLL builds. --# if defined(_WIN32) && defined(WEBP_DLL) -+# if defined(WEBP_DLL) && (defined(WIN32) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport))) - # define WEBP_EXTERN __declspec(dllexport) - # elif defined(__GNUC__) && __GNUC__ >= 4 - # define WEBP_EXTERN extern __attribute__ ((visibility ("default"))) --- -2.44.0.windows.1 - diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake deleted file mode 100644 index d8608cb6..00000000 --- a/ports/libwebp/portfile.cmake +++ /dev/null @@ -1,50 +0,0 @@ -set(VERSION 1.4.0) - -set(FILENAME "libwebp-${VERSION}.zip") -set(URLS "https://github.com/webmproject/libwebp/archive/v${VERSION}.zip") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 e5fa54f456ac9dddc3be2e740298b2c18233444716835306976c3c2a1e08063b3849fdf5376f34253a49e1b7bb072a9678d646b3377ef52541260af7ea5a1a0b -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Add-declspec-for-exporting-as-a-shared-library.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DWEBP_BUILD_ANIM_UTILS=OFF - -DWEBP_BUILD_CWEBP=OFF - -DWEBP_BUILD_DWEBP=OFF - -DWEBP_BUILD_GIF2WEBP=OFF - -DWEBP_BUILD_IMG2WEBP=OFF - -DWEBP_BUILD_VWEBP=OFF - -DWEBP_BUILD_WEBPINFO=OFF - -DWEBP_BUILD_WEBPMUX=OFF - -DWEBP_BUILD_EXTRAS=OFF -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Handle copyright -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebp/version ${VERSION}) diff --git a/ports/libwebp/vcpkg.json b/ports/libwebp/vcpkg.json deleted file mode 100644 index 1730b00a..00000000 --- a/ports/libwebp/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "libwebp", - "version": "1.4.0", - "description": "Lossy compression of digital photographic images.", - "homepage": "https://github.com/webmproject/libwebp", - "license": "BSD-3-Clause", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/libxml2/patches/0001-Remove-library-suffix-on-Windows.patch b/ports/libxml2/patches/0001-Remove-library-suffix-on-Windows.patch deleted file mode 100644 index 80b230bc..00000000 --- a/ports/libxml2/patches/0001-Remove-library-suffix-on-Windows.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 18120f1fbf2af73007c997a73af6ff735aa188b0 Mon Sep 17 00:00:00 2001 -From: Don -Date: Thu, 13 Jun 2024 15:32:36 -0700 -Subject: [PATCH] Remove library suffix on Windows - ---- - CMakeLists.txt | 19 ------------------- - 1 file changed, 19 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f99fd368..a3cda8dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -438,25 +438,6 @@ set_target_properties( - SOVERSION ${LIBXML_MAJOR_VERSION} - ) - --if(MSVC) -- if(BUILD_SHARED_LIBS) -- set_target_properties( -- LibXml2 -- PROPERTIES -- DEBUG_POSTFIX d -- ) -- else() -- set_target_properties( -- LibXml2 -- PROPERTIES -- DEBUG_POSTFIX sd -- MINSIZEREL_POSTFIX s -- RELEASE_POSTFIX s -- RELWITHDEBINFO_POSTFIX s -- ) -- endif() --endif() -- - install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) - - install( --- -2.47.0.windows.2 diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake deleted file mode 100644 index 1017aebe..00000000 --- a/ports/libxml2/portfile.cmake +++ /dev/null @@ -1,123 +0,0 @@ -set(VERSION_MAJOR 2) -set(VERSION_MINOR 13) -set(VERSION_PATCH 5) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(FILENAME "libxml2-${VERSION}.tar.xz") -set(URLS "https://download.gnome.org/sources/libxml2/${VERSION_MAJOR}.${VERSION_MINOR}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 acaecd4e3e95136d1c621f9e5f33976ebca87dfbf83859459e339597c3c57fbc47508a7de16af7fbf0e7e7c59fd6f9a82b2e732e1dd12efd79d666bac64ecf4e -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Remove-library-suffix-on-Windows.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - # Require ICU - -DLIBXML2_WITH_ICU=ON - - # Turn off tests and programs - -DLIBXML2_WITH_TESTS=OFF - -DLIBXML2_WITH_PROGRAMS=OFF - - # Options - -DLIBXML2_WITH_C14N=OFF - -DLIBXML2_WITH_CATALOG=OFF - -DLIBXML2_WITH_DEBUG=OFF - -DLIBXML2_WITH_FTP=OFF - -DLIBXML2_WITH_HTTP=OFF - -DLIBXML2_WITH_ICONV=OFF - -DLIBXML2_WITH_ISO8859X=ON - -DLIBXML2_WITH_LEGACY=OFF - -DLIBXML2_WITH_LZMA=OFF - -DLIBXML2_WITH_MODULES=OFF - -DLIBXML2_WITH_OUTPUT=ON - -DLIBXML2_WITH_PATTERN=OFF - -DLIBXML2_WITH_PUSH=ON - -DLIBXML2_WITH_PYTHON=OFF - -DLIBXML2_WITH_READER=OFF - -DLIBXML2_WITH_REGEXPS=ON - -DLIBXML2_WITH_SAX1=ON - -DLIBXML2_WITH_SCHEMAS=OFF - -DLIBXML2_WITH_SCHEMATRON=OFF - -DLIBXML2_WITH_THREADS=ON - -DLIBXML2_WITH_THREAD_ALLOC=OFF - -DLIBXML2_WITH_VALID=OFF - -DLIBXML2_WITH_WRITER=OFF - -DLIBXML2_WITH_XINCLUDE=OFF - -DLIBXML2_WITH_XPTR=OFF - -DLIBXML2_WITH_XPTR_LOCS=OFF - -DLIBXML2_WITH_ZLIB=OFF -) - -# libxslt requires certain features to be turned on -if (xslt IN_LIST FEATURES) - list(APPEND BUILD_OPTIONS - -DLIBXML2_WITH_HTML=ON - -DLIBXML2_WITH_TREE=ON - -DLIBXML2_WITH_XPATH=ON - ) -else () - list(APPEND BUILD_OPTIONS - -DLIBXML2_WITH_HTML=OFF - -DLIBXML2_WITH_TREE=OFF - -DLIBXML2_WITH_XPATH=OFF - ) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS ${BUILD_OPTIONS} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libxml2-${VERSION}) -vcpkg_fixup_pkgconfig() - -# Fix the xml2-config -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libxml2) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/xml2-config ${CURRENT_PACKAGES_DIR}/tools/libxml2/xml2-config) -vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/tools/libxml2/xml2-config [[$(cd "$(dirname "$0")"; pwd -P)/..]] [[$(cd "$(dirname "$0")/../.."; pwd -P)]]) - -if (NOT VCPKG_BUILD_TYPE) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libxml2/debug) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/xml2-config ${CURRENT_PACKAGES_DIR}/tools/libxml2/debug/xml2-config) - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/tools/libxml2/debug/xml2-config [[$(cd "$(dirname "$0")"; pwd -P)/..]] [[$(cd "$(dirname "$0")/../../../debug"; pwd -P)]]) - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/tools/libxml2/debug/xml2-config [[${prefix}/include]] [[${prefix}/../include]]) -endif() - -# Modify headers for static builds -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libxml2/libxml/xmlexports.h "ifdef LIBXML_STATIC" "if 1") -endif() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/libxml2/aclocal) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/libxml2/xml2-config) -file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2 RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libxml2/version ${VERSION}) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json deleted file mode 100644 index 5548b0df..00000000 --- a/ports/libxml2/vcpkg.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "libxml2", - "version": "2.13.5", - "description": "Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)", - "homepage": "http://xmlsoft.org", - "license": "MIT", - "dependencies": [ - { - "name": "icu", - "platform": "!linux" - }, - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ], - "features": { - "xslt": { - "description": "Compile Libxml2 with support for Libxslt." - } - } -} diff --git a/ports/libxslt/patches/0001-Remove-library-suffix-on-Windows.patch b/ports/libxslt/patches/0001-Remove-library-suffix-on-Windows.patch deleted file mode 100644 index 4721967a..00000000 --- a/ports/libxslt/patches/0001-Remove-library-suffix-on-Windows.patch +++ /dev/null @@ -1,68 +0,0 @@ -From e97542a70ed23ce935465a051ae3a8c110b46722 Mon Sep 17 00:00:00 2001 -From: Don Olmstead -Date: Fri, 5 Jul 2024 10:50:51 -0700 -Subject: [PATCH 1/2] Remove library suffix on Windows - ---- - CMakeLists.txt | 38 -------------------------------------- - 1 file changed, 38 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fb352475..0df2698e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -247,25 +247,6 @@ set_target_properties( - SOVERSION ${LIBXSLT_MAJOR_VERSION} - ) - --if(MSVC) -- if(BUILD_SHARED_LIBS) -- set_target_properties( -- LibXslt -- PROPERTIES -- DEBUG_POSTFIX d -- ) -- else() -- set_target_properties( -- LibXslt -- PROPERTIES -- DEBUG_POSTFIX sd -- MINSIZEREL_POSTFIX s -- RELEASE_POSTFIX s -- RELWITHDEBINFO_POSTFIX s -- ) -- endif() --endif() -- - install(FILES ${LIBXSLT_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxslt COMPONENT development) - - install( -@@ -340,25 +321,6 @@ set_target_properties( - SOVERSION ${LIBEXSLT_MAJOR_VERSION} - ) - --if(MSVC) -- if(BUILD_SHARED_LIBS) -- set_target_properties( -- LibExslt -- PROPERTIES -- DEBUG_POSTFIX d -- ) -- else() -- set_target_properties( -- LibExslt -- PROPERTIES -- DEBUG_POSTFIX sd -- MINSIZEREL_POSTFIX s -- RELEASE_POSTFIX s -- RELWITHDEBINFO_POSTFIX s -- ) -- endif() --endif() -- - install(FILES ${LIBEXSLT_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libexslt COMPONENT development) - - install( --- -2.45.2.windows.1 - diff --git a/ports/libxslt/patches/0002-Remove-config-requirement-for-libxml2.patch b/ports/libxslt/patches/0002-Remove-config-requirement-for-libxml2.patch deleted file mode 100644 index a8a9f2d0..00000000 --- a/ports/libxslt/patches/0002-Remove-config-requirement-for-libxml2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c14c71b3b84b07e80eb5e1c46067375711fe22d7 Mon Sep 17 00:00:00 2001 -From: Don Olmstead -Date: Fri, 22 Sep 2023 13:14:02 -0700 -Subject: [PATCH 2/2] Remove config requirement for libxml2 - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0df2698e..674b6e29 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -34,7 +34,7 @@ include(CMakePackageConfigHelpers) - include(GNUInstallDirs) - - if(NOT TARGET LibXml2) -- find_package(LibXml2 CONFIG REQUIRED) -+ find_package(LibXml2 REQUIRED) - endif() - - option(BUILD_SHARED_LIBS "Build shared libraries" ON) --- -2.45.2.windows.1 - diff --git a/ports/libxslt/portfile.cmake b/ports/libxslt/portfile.cmake deleted file mode 100644 index d3f0875d..00000000 --- a/ports/libxslt/portfile.cmake +++ /dev/null @@ -1,86 +0,0 @@ -set(VERSION_MAJOR 1) -set(VERSION_MINOR 1) -set(VERSION_PATCH 42) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(FILENAME "libxslt-${VERSION}.tar.xz") -set(URLS "https://download.gnome.org/sources/libxslt/${VERSION_MAJOR}.${VERSION_MINOR}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 02a2189b6cd65fa1fb929fc0e6868bc046bdd8827849f0048cdf9267ed9450745158cef0f2713a833e28fb520b312ff86dc5754dd423ce768c457bfd8812bdc7 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Remove-library-suffix-on-Windows.patch - ${CMAKE_CURRENT_LIST_DIR}/patches/0002-Remove-config-requirement-for-libxml2.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - # Options - -DLIBXSLT_WITH_CRYPTO=OFF - -DLIBXSLT_WITH_DEBUGGER=OFF - -DLIBXSLT_WITH_MODULES=OFF - -DLIBXSLT_WITH_PROFILER=OFF - -DLIBXSLT_WITH_PROGRAMS=OFF - -DLIBXSLT_WITH_PYTHON=OFF - -DLIBXSLT_WITH_TESTS=OFF - -DLIBXSLT_WITH_THREADS=OFF - -DLIBXSLT_WITH_TRIO=OFF - -DLIBXSLT_WITH_XSLT_DEBUG=OFF -) - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS ${BUILD_OPTIONS} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libxslt-${VERSION}) -vcpkg_fixup_pkgconfig() - -# Fix the xslt-config -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libxslt) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/xslt-config ${CURRENT_PACKAGES_DIR}/tools/libxslt/xslt-config) -vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/tools/libxslt/xslt-config [[$(cd "$(dirname "$0")"; pwd -P)/..]] [[$(cd "$(dirname "$0")/../.."; pwd -P)]]) - -if (NOT VCPKG_BUILD_TYPE) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libxslt/debug) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/xslt-config ${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/xslt-config) - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/xslt-config [[$(cd "$(dirname "$0")"; pwd -P)/..]] [[$(cd "$(dirname "$0")/../../../debug"; pwd -P)]]) - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/xslt-config [[${prefix}/include]] [[${prefix}/../include]]) -endif() - -# Modify headers for static builds -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h "ifdef LIBXSLT_STATIC" "if 1") - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h "ifdef LIBEXSLT_STATIC" "if 1") -endif() - -# Prepare distribution -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/xsltConf.sh) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/xsltConf.sh) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxslt RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libxslt/version ${VERSION}) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() diff --git a/ports/libxslt/vcpkg.json b/ports/libxslt/vcpkg.json deleted file mode 100644 index 6eee3ba2..00000000 --- a/ports/libxslt/vcpkg.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "libxslt", - "version": "1.1.42", - "description": "Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT", - "homepage": "http://xmlsoft.org/libxslt", - "license": "MIT", - "dependencies": [ - { - "name": "libxml2", - "features": [ - "xslt" - ] - }, - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake deleted file mode 100644 index fbd1fffd..00000000 --- a/ports/nghttp2/portfile.cmake +++ /dev/null @@ -1,66 +0,0 @@ -set(VERSION 1.64.0) - -set(FILENAME "nghttp2-${VERSION}.tar.xz") -set(URLS "https://github.com/nghttp2/nghttp2/releases/download/v${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 b544196c3b7a55faacd11700d11e2fe4f16a7418282c9abb24a668544a15293580fd1a2cc5f93367c8a17c7ee45335c6d2f5c68a72dd176d516fd033f203eeec -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - # ENABLE options - -DENABLE_DOC=OFF - -DENABLE_FAILMALLOC=OFF - -DENABLE_HTTP3=OFF - -DENABLE_LIB_ONLY=ON - -DENABLE_THREADS=OFF - -DENABLE_WERROR=OFF - # WITH options - -DWITH_JEMALLOC=OFF - -DWITH_LIBXML2=OFF - -DWITH_MRUBY=OFF - -DWITH_NEVERBLEED=OFF - -DWITH_LIBBPF=OFF -) - -if (VCPKG_LIBRARY_LINKAGE MATCHES static) - set(NGHTTP2_SHARED_LIB OFF) - set(NGHTTP2_STATIC_LIB ON) -else () - set(NGHTTP2_SHARED_LIB ON) - set(NGHTTP2_STATIC_LIB OFF) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} - -DBUILD_TESTING=OFF - -DBUILD_SHARED_LIBS=${NGHTTP2_SHARED_LIB} - -DBUILD_STATIC_LIBS=${NGHTTP2_STATIC_LIB} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/nghttp2) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/nghttp2 RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/nghttp2/version ${VERSION}) diff --git a/ports/nghttp2/vcpkg.json b/ports/nghttp2/vcpkg.json deleted file mode 100644 index 484f2e58..00000000 --- a/ports/nghttp2/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "nghttp2", - "version": "1.64.0", - "description": "Implementation of the Hypertext Transfer Protocol version 2 in C.", - "homepage": "https://nghttp2.org", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/nghttp3/portfile.cmake b/ports/nghttp3/portfile.cmake deleted file mode 100644 index 08474886..00000000 --- a/ports/nghttp3/portfile.cmake +++ /dev/null @@ -1,55 +0,0 @@ -set(VERSION 1.6.0) - -set(FILENAME "nghttp3-${VERSION}.tar.xz") -set(URLS "https://github.com/ngtcp2/nghttp3/releases/download/v${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 d0f585cf388a48d391f803897b0998c12c39e118ca380ecc48c4d3dfd3ff4588a5e456dc89a96f2f5ffd5afc261a2d60a71fd4d8ebb82af35bfe6668737538d8 -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -set(BUILD_OPTIONS - # ENABLE options - -DENABLE_LIB_ONLY=ON -) - -if (VCPKG_LIBRARY_LINKAGE MATCHES static) - set(NGHTTP3_SHARED_LIB OFF) - set(NGHTTP3_STATIC_LIB ON) -else () - set(NGHTTP3_SHARED_LIB ON) - set(NGHTTP3_STATIC_LIB OFF) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${BUILD_OPTIONS} - -DBUILD_TESTING=OFF - -DENABLE_SHARED_LIB=${NGHTTP3_SHARED_LIB} - -DENABLE_STATIC_LIB=${NGHTTP3_STATIC_LIB} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/nghttp3) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/nghttp3 RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/nghttp3/version ${VERSION}) diff --git a/ports/nghttp3/vcpkg.json b/ports/nghttp3/vcpkg.json deleted file mode 100644 index 58531dda..00000000 --- a/ports/nghttp3/vcpkg.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "nghttp3", - "version": "1.6.0", - "description": "An implementation of HTTP/3 mapping over QUIC and QPACK in C.", - "homepage": "https://github.com/ngtcp2/nghttp3", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/ngtcp2/patches/0001-Use-REQUIRED-when-finding-a-package.patch b/ports/ngtcp2/patches/0001-Use-REQUIRED-when-finding-a-package.patch deleted file mode 100644 index 505e281a..00000000 --- a/ports/ngtcp2/patches/0001-Use-REQUIRED-when-finding-a-package.patch +++ /dev/null @@ -1,126 +0,0 @@ -From bc5996d0abe310a551690052b8a721b404a4846e Mon Sep 17 00:00:00 2001 -From: Don Olmstead -Date: Wed, 16 Oct 2024 14:46:31 -0700 -Subject: [PATCH] Use REQUIRED when finding a package - -If an `ENABLE` option is `ON` and requires a package to be present it should fail the build if its not found. OpenSSL is still detected for the picotls backend but the OpenSSL backend will not be compiled out unless it was explicitly requested. - -Update the Windows GitHub Action build to set `ENABLE_OPENSSL` to `OFF` since an appropriate OpenSSL installation is not present. ---- - CMakeLists.txt | 48 +++++++++++++++++++------------------ - 2 files changed, 26 insertions(+), 24 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b6e1faf2..cbfaa5ff 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -117,16 +117,16 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC") - endif() - - if(ENABLE_GNUTLS) -- find_package(GnuTLS 3.7.2) -+ find_package(GnuTLS 3.7.2 REQUIRED) - endif() --if(ENABLE_OPENSSL) -- find_package(OpenSSL 1.1.1) -+if(ENABLE_OPENSSL OR ENABLE_PICOTLS) -+ find_package(OpenSSL 1.1.1 REQUIRED) - endif() - if(ENABLE_WOLFSSL) -- find_package(wolfssl 5.5.0) -+ find_package(wolfssl 5.5.0 REQUIRED) - endif() - if(ENABLE_JEMALLOC) -- find_package(Jemalloc) -+ find_package(Jemalloc REQUIRED) - endif() - find_package(Libev 4.11) - find_package(Libnghttp3 1.0.0) -@@ -138,25 +138,27 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) - # OpenSSL (required for libngtcp2_crypto_quictls, - # libngtcp2_crypto_picotls and examples) - include(CheckSymbolExists) --if(ENABLE_OPENSSL AND OPENSSL_FOUND) -+if(OPENSSL_FOUND) - set(VANILLA_OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR}) - set(VANILLA_OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES}) - set(HAVE_VANILLA_OPENSSL TRUE) - - # Until OpenSSL gains mainline support for QUIC, check for a patched version. -- cmake_push_check_state() -- set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") -- set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}") -- if(WIN32) -- set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" "ws2_32" "bcrypt") -- endif() -- check_symbol_exists(SSL_provide_quic_data "openssl/ssl.h" HAVE_SSL_PROVIDE_QUIC_DATA) -- if(NOT HAVE_SSL_PROVIDE_QUIC_DATA) -- message(WARNING "Disabling OpenSSL due to lack of QUIC support in ${OPENSSL_LIBRARIES}") -+ if(ENABLE_OPENSSL) -+ cmake_push_check_state() -+ set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") -+ set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}") -+ if(WIN32) -+ set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" "ws2_32" "bcrypt") -+ endif() -+ check_symbol_exists(SSL_provide_quic_data "openssl/ssl.h" HAVE_SSL_PROVIDE_QUIC_DATA) -+ if(NOT HAVE_SSL_PROVIDE_QUIC_DATA) -+ message(FATAL_ERROR "Unable to build OpenSSL backend due to lack of QUIC support in ${OPENSSL_LIBRARIES}") -+ endif() -+ cmake_pop_check_state() - endif() -- cmake_pop_check_state() - endif() --if(ENABLE_OPENSSL AND HAVE_SSL_PROVIDE_QUIC_DATA) -+if(ENABLE_OPENSSL) - set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR}) - set(HAVE_OPENSSL TRUE) - set(HAVE_CRYPTO TRUE) -@@ -174,11 +176,11 @@ if(ENABLE_BORINGSSL) - set(CMAKE_REQUIRED_LIBRARIES "${BORINGSSL_LIBRARIES}") - check_cxx_symbol_exists(SSL_set_quic_early_data_context "openssl/ssl.h" HAVE_SSL_SET_QUIC_EARLY_DATA_CONTEXT) - if(NOT HAVE_SSL_SET_QUIC_EARLY_DATA_CONTEXT) -- message(WARNING "Disabling BoringSSL due to lack of QUIC support in ${BORINGSSL_LIBRARIES}") -+ message(FATAL_ERROR "Unable to build BoringSSL backend due to lack of QUIC support in ${BORINGSSL_LIBRARIES}") - endif() - cmake_pop_check_state() - endif() --if(ENABLE_BORINGSSL AND HAVE_SSL_SET_QUIC_EARLY_DATA_CONTEXT) -+if(ENABLE_BORINGSSL) - set(BORINGSSL_INCLUDE_DIRS ${BORINGSSL_INCLUDE_DIR}) - set(HAVE_BORINGSSL TRUE) - set(HAVE_CRYPTO TRUE) -@@ -196,7 +198,7 @@ set(HAVE_LIBEV ${LIBEV_FOUND}) - set(HAVE_LIBNGHTTP3 ${LIBNGHTTP3_FOUND}) - - # GnuTLS (required for libngtcp2_crypto_gnutls) --if(ENABLE_GNUTLS AND GNUTLS_FOUND) -+if(ENABLE_GNUTLS) - set(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR}) - set(HAVE_GNUTLS TRUE) - set(HAVE_CRYPTO TRUE) -@@ -214,11 +216,11 @@ if(ENABLE_PICOTLS) - check_symbol_exists(ptls_openssl_random_bytes "picotls.h;picotls/openssl.h" - HAVE_PTLS_OPENSSL_RANDOM_BYTES) - if(NOT HAVE_PTLS_OPENSSL_RANDOM_BYTES) -- message(WARNING "Disabling Picotls because ptls_openssl_random_bytes not found in ${CMAKE_REQUIRED_LIBRARIES}") -+ message(FATAL_ERROR "Unable to build Picotls backend because ptls_openssl_random_bytes not found in ${CMAKE_REQUIRED_LIBRARIES}") - endif() - cmake_pop_check_state() - endif() --if(ENABLE_PICOTLS AND HAVE_PTLS_OPENSSL_RANDOM_BYTES) -+if(ENABLE_PICOTLS) - set(PICOTLS_INCLUDE_DIRS ${PICOTLS_INCLUDE_DIR}) - set(HAVE_PICOTLS TRUE) - set(HAVE_CRYPTO TRUE) -@@ -229,7 +231,7 @@ else() - endif() - - # wolfSSL (required for libngtcp2_crypto_wolfssl) --if(ENABLE_WOLFSSL AND WOLFSSL_FOUND) -+if(ENABLE_WOLFSSL) - set(WOLFSSL_INCLUDE_DIRS ${WOLFSSL_INCLUDE_DIR}) - set(HAVE_WOLFSSL TRUE) - set(HAVE_CRYPTO TRUE) --- -2.47.0.windows.1 diff --git a/ports/ngtcp2/portfile.cmake b/ports/ngtcp2/portfile.cmake deleted file mode 100644 index 280bfb62..00000000 --- a/ports/ngtcp2/portfile.cmake +++ /dev/null @@ -1,67 +0,0 @@ -set(VERSION 1.8.1) - -set(FILENAME "ngtcp2-${VERSION}.tar.xz") -set(URLS "https://github.com/ngtcp2/ngtcp2/releases/download/v${VERSION}/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 18728ee0376de319a99c3c5a294a7250a8fefa82fd530f0f2882540da2bada2451644898561be6bb6d95e6c8b7e129337edefe3e71d5ca820beb67db0db7d331 -) - -# Patches -set(PATCHES - # Remove after next release - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Use-REQUIRED-when-finding-a-package.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -if (VCPKG_LIBRARY_LINKAGE MATCHES static) - set(NGTCP2_SHARED_LIB OFF) - set(NGTCP2_STATIC_LIB ON) -else () - set(NGTCP2_SHARED_LIB ON) - set(NGTCP2_STATIC_LIB OFF) -endif () - -# Each port of an OpenSSL equivalent checks to see that no other variant is installed so -# just check to see if any OpenSSL variants are requested and if not use the system one -set(USE_OPENSSL ON) -if (NOT libressl IN_LIST FEATURES) - if (EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") - message(FATAL_ERROR "Can't build with system SSL library if OpenSSL is installed. Please remove OpenSSL and try to install again") - endif() - - message(STATUS "Using system SSL library") -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_TESTING=OFF - -DENABLE_OPENSSL=ON - -DENABLE_SHARED_LIB=${NGTCP2_SHARED_LIB} - -DENABLE_STATIC_LIB=${NGTCP2_STATIC_LIB} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ngtcp2) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ngtcp2 RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/ngtcp2/version ${VERSION}) diff --git a/ports/ngtcp2/vcpkg.json b/ports/ngtcp2/vcpkg.json deleted file mode 100644 index 3a3ec39c..00000000 --- a/ports/ngtcp2/vcpkg.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "ngtcp2", - "version": "1.8.1", - "description": "An effort to implement RFC9000 QUIC protocol.", - "homepage": "https://github.com/ngtcp2/ngtcp2", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ], - "features": { - "libressl": { - "description": "SSL support through libressl. If no SSL libraries are specified then the system SSL library will be used.", - "dependencies": [ - "libressl" - ] - } - } -} diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake new file mode 100644 index 00000000..56a9e6f0 --- /dev/null +++ b/ports/openssl/portfile.cmake @@ -0,0 +1,2 @@ +# Mapping openssl to libressl +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/openssl/vcpkg.json b/ports/openssl/vcpkg.json new file mode 100644 index 00000000..f21dfcba --- /dev/null +++ b/ports/openssl/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "openssl", + "version-string": "libressl", + "description": [ + "LibreSSL is a TLS/crypto stack.", + "It was forked from OpenSSL in 2014 by the OpenBSD project, with goals of modernizing the codebase, improving security, and applying best practice development processes.", + "LibreSSL provides much of the OpenSSL 1.1 API. Incompatibilities between the projects exist and are unavoidable since both evolve with different goals and priorities." + ], + "homepage": "https://www.libressl.org", + "license": "ISC", + "dependencies": [ + "libressl" + ] +} diff --git a/ports/pixman/build/CMakeLists.txt b/ports/pixman/build/CMakeLists.txt deleted file mode 100644 index ea164d8d..00000000 --- a/ports/pixman/build/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -project(pixman) -set(PACKAGE pixman) -cmake_minimum_required(VERSION 2.8.8) - -include(GNUInstallDirs) - -# detect version -file (READ configure.ac configure_ac) -string (REGEX REPLACE ".*pixman_major], ([0-9]+).*" "\\1" PIXMAN_VERSION_MAJOR ${configure_ac}) -string (REGEX REPLACE ".*pixman_minor], ([0-9]+).*" "\\1" PIXMAN_VERSION_MINOR ${configure_ac}) -string (REGEX REPLACE ".*pixman_micro], ([0-9]+).*" "\\1" PIXMAN_VERSION_MICRO ${configure_ac}) -set(PIXMAN_VERSION "${PIXMAN_VERSION_MAJOR}.${PIXMAN_VERSION_MINOR}.${PIXMAN_VERSION_MICRO}") - -if(BUILD_SHARED_LIBS) - option(BUILD_TESTS "build tests" OFF) -endif() - -set(CMAKE_DEBUG_POSTFIX "d") - -#dependencies -find_package(Threads) -if(BUILD_SHARED_LIBS AND BUILD_TESTS) - find_package(PNG) - find_package(OpenMP) -endif() - -#arch optimizations -include(${CMAKE_SOURCE_DIR}/cmake/arch_detect.cmake) -include(${CMAKE_SOURCE_DIR}/cmake/arch_configure.cmake) - -#config -include(${CMAKE_SOURCE_DIR}/cmake/config_configure.cmake) - -include_directories( - ${CMAKE_BINARY_DIR}/pixman - ${CMAKE_SOURCE_DIR}/pixman -) - -if(MSVC) - set(CMAKE_C_FLAGS "/wd4244 /wd4146 ${CMAKE_C_FLAGS}") -endif() - -add_subdirectory(pixman) - -if(BUILD_TESTS) - add_subdirectory(test) -endif() - -include(${CMAKE_SOURCE_DIR}/cmake/cmake_package.cmake) diff --git a/ports/pixman/build/cmake/PixmanConfig.cmake b/ports/pixman/build/cmake/PixmanConfig.cmake deleted file mode 100644 index 17daf5c9..00000000 --- a/ports/pixman/build/cmake/PixmanConfig.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/PixmanTargets.cmake") \ No newline at end of file diff --git a/ports/pixman/build/cmake/arch_configure.cmake b/ports/pixman/build/cmake/arch_configure.cmake deleted file mode 100644 index 2dfd1014..00000000 --- a/ports/pixman/build/cmake/arch_configure.cmake +++ /dev/null @@ -1,20 +0,0 @@ -target_architecture(ARCHITECTURE) -#options for arch -if(ARCHITECTURE STREQUAL "i386" OR ARCHITECTURE STREQUAL "x86_64") - SET(X86 1) - OPTION(X86_MMX "Enable MMX optimizations" OFF) - OPTION(X86_SSE2 "Enable SSE2 optimizations" OFF) - OPTION(X86_SSSE3 "Enable SSSE3 optimizations" OFF) -elseif(ARCHITECTURE STREQUAL "arm") - SET(ARM 1) - OPTION(ARM_IWMMXT "Enable IWMMXT compiler intrinsics" OFF) - OPTION(ARM_NEON "Enable NEON optimizations" OFF) - OPTION(ARM_SIMD "Enable SIMD optimizations" OFF) -elseif(ARCHITECTURE STREQUAL "ppc" OR ARCHITECTURE STREQUAL "ppc64") - SET(PPC 1) - OPTION(PPC_VMX "Enable VMX optimizations" OFF) -else() - SET(MIPS 1) - OPTION(MIPS_DSPR2 "Enable DSPR2 optimizations" OFF) - OPTION(MIPS_LOONGSON_MMI "Enable Loongson Multimedia Instructions" OFF) -endif(ARCHITECTURE STREQUAL "i386" OR ARCHITECTURE STREQUAL "x86_64") diff --git a/ports/pixman/build/cmake/arch_detect.cmake b/ports/pixman/build/cmake/arch_detect.cmake deleted file mode 100644 index 3761e4df..00000000 --- a/ports/pixman/build/cmake/arch_detect.cmake +++ /dev/null @@ -1,134 +0,0 @@ -# Based on the Qt 5 processor detection code, so should be very accurate -# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h -# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64) - -# Regarding POWER/PowerPC, just as is noted in the Qt source, -# "There are many more known variants/revisions that we do not handle/detect." - -set(archdetect_c_code " -#if defined(__arm__) || defined(__TARGET_ARCH_ARM) - #if defined(__ARM_ARCH_7__) \\ - || defined(__ARM_ARCH_7A__) \\ - || defined(__ARM_ARCH_7R__) \\ - || defined(__ARM_ARCH_7M__) \\ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) - #error cmake_ARCH armv7 - #elif defined(__ARM_ARCH_6__) \\ - || defined(__ARM_ARCH_6J__) \\ - || defined(__ARM_ARCH_6T2__) \\ - || defined(__ARM_ARCH_6Z__) \\ - || defined(__ARM_ARCH_6K__) \\ - || defined(__ARM_ARCH_6ZK__) \\ - || defined(__ARM_ARCH_6M__) \\ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) - #error cmake_ARCH armv6 - #elif defined(__ARM_ARCH_5TEJ__) \\ - || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) - #error cmake_ARCH armv5 - #else - #error cmake_ARCH arm - #endif -#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) - #error cmake_ARCH i386 -#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) - #error cmake_ARCH x86_64 -#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) - #error cmake_ARCH ia64 -#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\ - || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\ - || defined(_M_MPPC) || defined(_M_PPC) - #if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__) - #error cmake_ARCH ppc64 - #else - #error cmake_ARCH ppc - #endif -#endif - -#error cmake_ARCH unknown -") - -# Set ppc_support to TRUE before including this file or ppc and ppc64 -# will be treated as invalid architectures since they are no longer supported by Apple - -function(target_architecture output_var) - if(APPLE AND CMAKE_OSX_ARCHITECTURES) - # On OS X we use CMAKE_OSX_ARCHITECTURES *if* it was set - # First let's normalize the order of the values - - # Note that it's not possible to compile PowerPC applications if you are using - # the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we - # disable it by default - # See this page for more information: - # http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4 - - # Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime. - # On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise. - - foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES}) - if("${osx_arch}" STREQUAL "ppc" AND ppc_support) - set(osx_arch_ppc TRUE) - elseif("${osx_arch}" STREQUAL "i386") - set(osx_arch_i386 TRUE) - elseif("${osx_arch}" STREQUAL "x86_64") - set(osx_arch_x86_64 TRUE) - elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support) - set(osx_arch_ppc64 TRUE) - else() - message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}") - endif() - endforeach() - - # Now add all the architectures in our normalized order - if(osx_arch_ppc) - list(APPEND ARCH ppc) - endif() - - if(osx_arch_i386) - list(APPEND ARCH i386) - endif() - - if(osx_arch_x86_64) - list(APPEND ARCH x86_64) - endif() - - if(osx_arch_ppc64) - list(APPEND ARCH ppc64) - endif() - else() - file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}") - - enable_language(C) - - # Detect the architecture in a rather creative way... - # This compiles a small C program which is a series of ifdefs that selects a - # particular #error preprocessor directive whose message string contains the - # target architecture. The program will always fail to compile (both because - # file is not a valid C program, and obviously because of the presence of the - # #error preprocessor directives... but by exploiting the preprocessor in this - # way, we can detect the correct target architecture even when cross-compiling, - # since the program itself never needs to be run (only the compiler/preprocessor) - try_run( - run_result_unused - compile_result_unused - "${CMAKE_BINARY_DIR}" - "${CMAKE_BINARY_DIR}/arch.c" - COMPILE_OUTPUT_VARIABLE ARCH - CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} - ) - - # Parse the architecture name from the compiler output - string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}") - - # Get rid of the value marker leaving just the architecture name - string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}") - - # If we are compiling with an unknown architecture this variable should - # already be set to "unknown" but in the case that it's empty (i.e. due - # to a typo in the code), then set it to unknown - if (NOT ARCH) - set(ARCH unknown) - endif() - endif() - - set(${output_var} "${ARCH}" PARENT_SCOPE) -endfunction() diff --git a/ports/pixman/build/cmake/cmake_package.cmake b/ports/pixman/build/cmake/cmake_package.cmake deleted file mode 100644 index 2327d769..00000000 --- a/ports/pixman/build/cmake/cmake_package.cmake +++ /dev/null @@ -1,44 +0,0 @@ -include(CMakePackageConfigHelpers) - -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfigVersion.cmake" - VERSION - ${PIXMAN_VERSION} - COMPATIBILITY - AnyNewerVersion -) - -export( - EXPORT - PixmanTargets - FILE - "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanTargets.cmake" - NAMESPACE - Upstream:: -) - -configure_file(cmake/PixmanConfig.cmake - "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfig.cmake" - COPYONLY -) - -install( - EXPORT - PixmanTargets - FILE - PixmanTargets.cmake - NAMESPACE - Upstream:: - DESTINATION - ${CMAKE_INSTALL_DATADIR}/pixman -) - -install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/pixman/PixmanConfigVersion.cmake" - DESTINATION - ${CMAKE_INSTALL_DATADIR}/pixman - COMPONENT - Devel -) diff --git a/ports/pixman/build/cmake/config_configure.cmake b/ports/pixman/build/cmake/config_configure.cmake deleted file mode 100644 index b5094253..00000000 --- a/ports/pixman/build/cmake/config_configure.cmake +++ /dev/null @@ -1,96 +0,0 @@ -# Checking Headers and Functions for pixman -add_definitions(-DHAVE_CONFIG_H) - -include( CheckIncludeFile ) -include( CheckFunctionExists ) -include( CheckLibraryExists ) -include( CheckTypeSize) - -if(OPENMP_FOUND) - set(USE_OPENMP 1) -endif() - -if(PNG_FOUND) - set(HAVE_LIBPNG 1) -endif() - -if(CMAKE_USE_PTHREADS_INIT) - set(HAVE_PTHREADS 1) -endif() - -if(CMAKE_COMPILER_IS_GNUCC) - set(HAVE_GCC_VECTOR_EXTENSIONS 1) -endif() - -check_include_file( "dlfcn.h" HAVE_DLFCN_H ) -check_include_file( "fenv.h" HAVE_FENV_H ) -check_include_file( "inttypes.h" HAVE_INTTYPES_H ) -check_include_file( "memory.h" HAVE_MEMORY_H ) -check_include_file( "stdint.h" HAVE_STDINT_H ) -check_include_file( "stdlib.h" HAVE_STDLIB_H ) -check_include_file( "strings.h" HAVE_STRINGS_H ) -check_include_file( "string.h" HAVE_STRING_H ) -check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H ) -check_include_file( "sys/stat.h" HAVE_SYS_STAT_H ) -check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) -check_include_file( "unistd.h" HAVE_UNISTD_H ) - -check_function_exists( __builtin_clz HAVE_BUILTIN_CLZ ) -check_function_exists( alarm HAVE_ALARM ) -check_function_exists( feenableexcept HAVE_FEENABLEEXCEPT ) -check_function_exists( getisax HAVE_GETISAX ) -check_function_exists( getpagesize HAVE_GETPAGESIZE ) -check_function_exists( gettimeofday HAVE_GETTIMEOFDAY ) -check_function_exists( mmap HAVE_MMAP ) -check_function_exists( mprotect HAVE_MPROTECT ) -check_function_exists( posix_memalign HAVE_POSIX_MEMALIGN ) -check_function_exists( sigaction HAVE_SIGACTION ) - -CHECK_TYPE_SIZE("long" SIZEOF_LONG) -CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128) -if(SIZEOF___FLOAT128) - set(HAVE_FLOAT128 1) -endif() - -if (ARM_IWMMXT) - set(USE_ARM_IWMMXT 1) -endif (ARM_IWMMXT) -if (ARM_NEON) - set(USE_ARM_NEON 1) -endif (ARM_NEON) -if (ARM_SIMD) - set(USE_ARM_SIMD 1) -endif (ARM_SIMD) - -if (PPC_VMX) - set(USE_VMX 1) -endif (PPC_VMX) - -if (MIPS_LOONGSON_MMI) - set(USE_LOONGSON_MMI 1) -endif (MIPS_LOONGSON_MMI) -if (MIPS_DSPR2) - set(USE_MIPS_DSPR2 1) -endif (MIPS_DSPR2) - -if (X86_MMX) - set(USE_X86_MMX 1) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmmx") - endif() -endif (X86_MMX) -if (X86_SSE2) - set(USE_SSE2 1) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2") - endif() -endif (X86_SSE2) -if (X86_SSSE3) - set(USE_SSSE3 1) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mssse3") - endif() -endif(X86_SSSE3) - -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/config_source.cmake ${CMAKE_CURRENT_BINARY_DIR}/pixman/config.h ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/pixman/pixman-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pixman/pixman-version.h) diff --git a/ports/pixman/build/cmake/config_source.cmake b/ports/pixman/build/cmake/config_source.cmake deleted file mode 100644 index 16aad241..00000000 --- a/ports/pixman/build/cmake/config_source.cmake +++ /dev/null @@ -1,182 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -#cmakedefine AC_APPLE_UNIVERSAL_BUILD - -/* Whether we have alarm() */ -#cmakedefine HAVE_ALARM @HAVE_ALARM@ - -/* Whether the compiler supports __builtin_clz */ -#cmakedefine HAVE_BUILTIN_CLZ @HAVE_BUILTIN_CLZ@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@ - -/* Whether we have feenableexcept() */ -#cmakedefine HAVE_FEENABLEEXCEPT @HAVE_FEENABLEEXCEPT@ - -/* Define to 1 if we have */ -#cmakedefine HAVE_FENV_H @HAVE_FENV_H@ - -/* Whether the tool chain supports __float128 */ -#cmakedefine HAVE_FLOAT128 @HAVE_FLOAT128@ - -/* Define to 1 if you have the `getisax' function. */ -#cmakedefine HAVE_GETISAX @HAVE_GETISAX@ - -/* Whether we have getpagesize() */ -#cmakedefine HAVE_GETPAGESIZE @HAVE_GETPAGESIZE@ - -/* Whether we have gettimeofday() */ -#cmakedefine HAVE_GETTIMEOFDAY @HAVE_GETTIMEOFDAY@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ - -/* Define to 1 if you have the `pixman-1' library (-lpixman-1). */ -#cmakedefine HAVE_LIBPIXMAN_1 - -/* Whether we have libpng */ -#cmakedefine HAVE_LIBPNG @HAVE_LIBPNG@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@ - -/* Whether we have mmap() */ -#cmakedefine HAVE_MMAP @HAVE_MMAP@ - -/* Whether we have mprotect() */ -#cmakedefine HAVE_MPROTECT @HAVE_MPROTECT@ - -/* Whether we have posix_memalign() */ -#cmakedefine HAVE_POSIX_MEMALIGN @HAVE_POSIX_MEMALIGN@ - -/* Whether pthreads is supported */ -#cmakedefine HAVE_PTHREADS @HAVE_PTHREADS@ - -/* Whether we have sigaction() */ -#cmakedefine HAVE_SIGACTION @HAVE_SIGACTION@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ - -/* Define to 1 if we have */ -#cmakedefine HAVE_SYS_MMAN_H @HAVE_SYS_MMAN_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#cmakedefine LT_OBJDIR - -/* Name of package */ -#cmakedefine PACKAGE @PACKAGE@ - -/* Define to the address where bug reports for this package should be sent. */ -#cmakedefine PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#cmakedefine PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#cmakedefine PACKAGE_URL - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION - -/* enable TIMER_BEGIN/TIMER_END macros */ -#cmakedefine PIXMAN_TIMERS - -/* The size of `long', as computed by sizeof. */ -#cmakedefine SIZEOF_LONG @SIZEOF_LONG@ - -/* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS 1 - -/* The compiler supported TLS storage class */ -#cmakedefine TLS - -/* Whether the tool chain supports __attribute__((constructor)) */ -#cmakedefine TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR - -/* use ARM IWMMXT compiler intrinsics */ -#cmakedefine USE_ARM_IWMMXT @USE_ARM_IWMMXT@ - -/* use ARM NEON assembly optimizations */ -#cmakedefine USE_ARM_NEON @USE_ARM_NEON@ - -/* use ARM SIMD assembly optimizations */ -#cmakedefine USE_ARM_SIMD @USE_ARM_SIMD@ - -/* use GNU-style inline assembler */ -#cmakedefine USE_GCC_INLINE_ASM - -/* use Loongson Multimedia Instructions */ -#cmakedefine USE_LOONGSON_MMI @USE_LOONGSON_MMI@ - -/* use MIPS DSPr2 assembly optimizations */ -#cmakedefine USE_MIPS_DSPR2 @USE_MIPS_DSPR2@ - -/* use OpenMP in the test suite */ -#cmakedefine USE_OPENMP @OPENMP_FOUND@ - -/* use SSE2 compiler intrinsics */ -#cmakedefine USE_SSE2 @USE_SSE2@ - -/* use SSSE3 compiler intrinsics */ -#cmakedefine USE_SSSE3 @USE_SSSE3@ - -/* use VMX compiler intrinsics */ -#cmakedefine USE_VMX @USE_VMX@ - -/* use x86 MMX compiler intrinsics */ -#cmakedefine USE_X86_MMX @USE_X86_MMX@ - -/* use GCC Vector Extensions */ -#cmakedefine HAVE_GCC_VECTOR_EXTENSIONS @HAVE_GCC_VECTOR_EXTENSIONS@ - -/* use OpenMP */ -#cmakedefine USE_OPENMP @USE_OPENMP@ - -/* Version number of package */ -#cmakedefine VERSION @PIXMAN_VERSION@ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif \ No newline at end of file diff --git a/ports/pixman/build/pixman/CMakeLists.txt b/ports/pixman/build/pixman/CMakeLists.txt deleted file mode 100644 index 99a2ec56..00000000 --- a/ports/pixman/build/pixman/CMakeLists.txt +++ /dev/null @@ -1,120 +0,0 @@ -set(SOURCES - pixman.c - pixman-access.c - pixman-access-accessors.c - pixman-bits-image.c - pixman-combine32.c - pixman-combine-float.c - pixman-conical-gradient.c - pixman-filter.c - pixman-x86.c - pixman-mips.c - pixman-arm.c - pixman-ppc.c - pixman-edge.c - pixman-edge-accessors.c - pixman-fast-path.c - pixman-glyph.c - pixman-general.c - pixman-gradient-walker.c - pixman-image.c - pixman-implementation.c - pixman-linear-gradient.c - pixman-matrix.c - pixman-noop.c - pixman-radial-gradient.c - pixman-region16.c - pixman-region32.c - pixman-solid-fill.c - pixman-timer.c - pixman-trap.c - pixman-utils.c -) - -set(HEADERS - pixman.h - pixman-accessor.h - pixman-combine32.h - pixman-compiler.h - pixman-edge-imp.h - pixman-inlines.h - pixman-private.h -) - -#proccesor_optimizations -if(ARM) - if (ARM_NEON) - add_definitions(-DUSE_ARM_NEON) - list(APPEND SOURCES pixman-arm-neon.c - pixman-arm-neon-asm.S - pixman-arm-neon-asm-bilinear.S - ) - endif (ARM_NEON) - if (ARM_SIMD) - add_definitions(-DUSE_ARM_SIMD) - list(APPEND SOURCES pixman-arm-simd.c - pixman-arm-simd-asm.S - pixman-arm-simd-asm-scaled.S - ) - endif (ARM_SIMD) - if (ARM_IWMMXT) - add_definitions(-DUSE_ARM_IWMMXT) - list(APPEND SOURCES "pixman-mmx.c") - endif() -endif(ARM) - -if(MIPS) - if (MIPS_DSPR2) - add_definitions(-DUSE_MIPS_DSPR2) - list(APPEND SOURCES pixman-mips-dspr2.c - pixman-mips-dspr2-asm.S - pixman-mips-memcpy-asm.S - ) - endif (MIPS_DSPR2) - if (MIPS_LOONGSON_MMI) - add_definitions(-DUSE_LOONGSON_MMI) - list(APPEND SOURCES "pixman-mmx.c") - endif() -endif(MIPS) - -if(PPC) - if (PPC_VMX) - add_definitions(-DUSE_VMX) - list(APPEND SOURCES "pixman-vmx.c") - endif (PPC_VMX) -endif(PPC) - -if(X86) - if (X86_MMX) - add_definitions(-DUSE_X86_MMX) - list(APPEND SOURCES "pixman-mmx.c") - endif (X86_MMX) - if (X86_SSE2) - add_definitions(-DUSE_SSE2) - list(APPEND SOURCES "pixman-sse2.c") - endif (X86_SSE2) - if (X86_SSSE3) - add_definitions(-DUSE_SSSE3) - list(APPEND SOURCES "pixman-ssse3.c") - endif(X86_SSSE3) -endif(X86) - -if(UNIX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") -endif() - -add_library(pixman-1_core OBJECT ${SOURCES} ${HEADERS}) -add_library(pixman-1 $) - -install( - TARGETS pixman-1 - EXPORT PixmanTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -) - -install( - FILES pixman.h ${CMAKE_CURRENT_BINARY_DIR}/pixman-version.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pixman-1 -) diff --git a/ports/pixman/build/test/CMakeLists.txt b/ports/pixman/build/test/CMakeLists.txt deleted file mode 100644 index 9b20737f..00000000 --- a/ports/pixman/build/test/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -add_library(libutils STATIC utils.c utils-prng.c) - -macro(add_test _target) - add_executable(${_target} ${_target}.c) - target_link_libraries(${_target} pixman-1 libutils) -endmacro() - -# Tests (sorted by expected completion time) -set(TESTPROGRAMS - oob-test - infinite-loop - trap-crasher - fence-image-self-test - region-translate-test - fetch-test - a1-trap-test - prng-test - radial-invalid - pdf-op-test - region-test - combiner-test - scaling-crash-test - alpha-loop - scaling-helpers-test - thread-test - rotate-test - alphamap - gradient-crash-test - pixel-test - matrix-test - composite-traps-test - region-contains-test - glyph-test - solid-test - stress-test - cover-test - blitters-test - affine-test - scaling-test - composite - tolerance-test -) - -# Other programs -set(OTHERPROGRAMS - lowlevel-blt-bench - radial-perf-test - check-formats - scaling-bench - affine-bench -) - -foreach(program IN LISTS TESTPROGRAMS) - add_test(${program}) -endforeach() - -foreach(program IN LISTS OTHERPROGRAMS) - add_test(${program}) -endforeach() diff --git a/ports/pixman/patches/0001-Add-__has_declspec_attribute.patch b/ports/pixman/patches/0001-Add-__has_declspec_attribute.patch deleted file mode 100644 index e7bbbb94..00000000 --- a/ports/pixman/patches/0001-Add-__has_declspec_attribute.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2451154ac1e66f4fc7a5a929cd1baaf6dd4b2995 Mon Sep 17 00:00:00 2001 -From: Don -Date: Thu, 22 Mar 2018 11:36:03 -0700 -Subject: [PATCH] Add __has_declspec_attribute - -Add __has_declspec_attribute around noinline. ---- - pixman/pixman-compiler.h | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h -index 2489adc..95c88eb 100644 ---- a/pixman/pixman-compiler.h -+++ b/pixman/pixman-compiler.h -@@ -71,6 +71,10 @@ - # define M_PI 3.14159265358979323846 - #endif - -+#ifndef __has_declspec_attribute -+#define __has_declspec_attribute(x) 0 -+#endif -+ - #ifdef _MSC_VER - /* 'inline' is available only in C++ in MSVC */ - # define inline __inline -@@ -79,7 +83,11 @@ - #elif defined __GNUC__ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) - # define inline __inline__ - # define force_inline __inline__ __attribute__ ((__always_inline__)) --# define noinline __attribute__((noinline)) -+# if __has_declspec_attribute(noinline) -+# define noinline __declspec(noinline) -+# else -+# define noinline __attribute__((noinline)) -+# endif - #else - # ifndef force_inline - # define force_inline inline --- -2.14.1.windows.1 - diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake deleted file mode 100644 index 915aad8c..00000000 --- a/ports/pixman/portfile.cmake +++ /dev/null @@ -1,79 +0,0 @@ -set(VERSION 0.42.2) - -set(FILENAME "pixman-${VERSION}.tar.gz") -set(URLS "https://www.cairographics.org/releases/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 0a4e327aef89c25f8cb474fbd01de834fd2a1b13fdf7db11ab72072082e45881cd16060673b59d02054b1711ae69c6e2395f6ae9214225ee7153939efcd2fa5d -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Add-__has_declspec_attribute.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Add CMake sources -file(COPY ${CMAKE_CURRENT_LIST_DIR}/build/cmake DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/build/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/build/pixman/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/build/test/CMakeLists.txt DESTINATION ${SOURCE_PATH}/test) - -# Run CMake build -if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(BUILD_OPTIONS - -DX86_MMX=OFF - -DX86_SSE2=ON - -DX86_SSSE3=ON - ) -elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "^arm") - set(BUILD_OPTIONS - -DARM_IWMMXT=OFF - -DARM_NEON=ON - -DARM_SIMD=OFF - ) -endif () - -# Check for testing feature -if (testing IN_LIST FEATURES) - message(STATUS "Enabling Tests") - set(BUILD_OPTIONS ${BUILD_OPTIONS} -DBUILD_TESTS=ON) -else () - set(BUILD_OPTIONS ${BUILD_OPTIONS} -DBUILD_TESTS=OFF) -endif () - -if (NOT VCPKG_CMAKE_SYSTEM_NAME) - set(VCPKG_CMAKE_SYSTEM_NAME Windows) -endif () - -if (VCPKG_CRT_LINKAGE STREQUAL dynamic AND VCPKG_CMAKE_SYSTEM_NAME MATCHES "^Windows") - list(APPEND BUILD_OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON) -endif () - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS ${BUILD_OPTIONS} - MAYBE_UNUSED_VARIABLES - CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup() -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pixman RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/pixman/version ${VERSION}) diff --git a/ports/pixman/vcpkg.json b/ports/pixman/vcpkg.json deleted file mode 100644 index 26bcb512..00000000 --- a/ports/pixman/vcpkg.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "pixman", - "version": "0.42.2", - "description": "Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization.", - "homepage": "http://www.pixman.org", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ], - "features": { - "testing": { - "description": "Enable testing of pixman.", - "dependencies": [ - "libpng" - ] - } - } -} diff --git a/ports/sqlite3/patches/0001-Add-CMake-build.patch b/ports/sqlite3/patches/0001-Add-CMake-build.patch deleted file mode 100644 index d027c85c..00000000 --- a/ports/sqlite3/patches/0001-Add-CMake-build.patch +++ /dev/null @@ -1,397 +0,0 @@ -From e4d8f9aa230c7319b14ef5fcb62744cb2fc2c19b Mon Sep 17 00:00:00 2001 -From: Don Olmstead -Date: Tue, 21 Mar 2023 17:20:21 -0700 -Subject: [PATCH] Add CMake build - -Follows along with the configure options and checks. The `sqlite_cfg.h.cmake` header does an `undef` for any config value that isn't set to 1. The sqlite code isn't consistent with how it checks if a value is turned on. ---- - CMakeLists.txt | 209 +++++++++++++++++++++++++++++++++++++++++++++ - sqlite3.pc.cmake | 11 +++ - sqlite_cfg.h.cmake | 142 ++++++++++++++++++++++++++++++ - 3 files changed, 362 insertions(+) - create mode 100644 CMakeLists.txt - create mode 100644 sqlite3.pc.cmake - create mode 100644 sqlite_cfg.h.cmake - -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000000..0a7a878d7c ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,209 @@ -+cmake_minimum_required(VERSION 3.10) -+ -+project(sqlite VERSION 3.45.3 LANGUAGES C) -+ -+option(ENABLE_THREADSAFE "Whether to support threadsafe operation" OFF) -+option(ENABLE_LOAD_EXTENSION "Whether to support loadable extensions" ON) -+option(ENABLE_MATH "Whether to support math functions" OFF) -+option(ENABLE_JSON "Whether to support JSON functions" ON) -+option(ENABLE_MEMSYS5 "Whether to support MEMSYS5" OFF) -+option(ENABLE_MEMSYS3 "Whether to support MEMSYS3" OFF) -+option(ENABLE_FTS3 "Whether to enable FTS3 extension" OFF) -+option(ENABLE_FTS4 "Whether to enable FTS4 extension" OFF) -+option(ENABLE_FTS5 "Whether to enable FTS5 extension" OFF) -+option(ENABLE_UPDATE_LIMIT "Whether to support LIMIT on UPDATE and DELETE statements" OFF) -+option(ENABLE_GEOPOLY "Whether to enable GEOPOLY extension" OFF) -+option(ENABLE_RTREE "Whether to enable RTREE extension" OFF) -+option(ENABLE_SESSION "Whether to enable SESSION extension" OFF) -+ -+option(ENABLE_SHELL "Whether to build the SQLite shell" OFF) -+option(WITH_ZLIB "Whether to enable zlib support" OFF) -+ -+add_library(sqlite3 sqlite3.c) -+target_compile_definitions(sqlite3 PRIVATE -+ $<$:SQLITE_DEBUG=1> -+ $<$:SQLITE_ENABLE_SELECTTRACE> -+ $<$:SQLITE_ENABLE_WHERETRACE> -+) -+target_include_directories(sqlite3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -+ -+if (ENABLE_THREADSAFE) -+ target_compile_definitions(sqlite3 PRIVATE SQLITE_THREADSAFE=1) -+ find_package(Threads REQUIRED) -+ target_link_libraries(sqlite3 PRIVATE Threads::Threads) -+ string(APPEND PKGCONFIG_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") -+else () -+ target_compile_definitions(sqlite3 PRIVATE SQLITE_THREADSAFE=0) -+endif() -+ -+if (ENABLE_LOAD_EXTENSION) -+ target_link_libraries(sqlite3 PRIVATE ${CMAKE_DL_LIBS}) -+else () -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_OMIT_LOAD_EXTENSION") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_OMIT_LOAD_EXTENSION) -+endif() -+ -+if (ENABLE_MATH) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_MATH_FUNCTIONS") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_MATH_FUNCTIONS) -+endif() -+ -+if (NOT ENABLE_JSON) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_OMIT_JSON") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_OMIT_JSON) -+endif() -+ -+if (ENABLE_MEMSYS5) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_MEMSYS5") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_MEMSYS5) -+endif() -+ -+if (ENABLE_MEMSYS3) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_MEMSYS3") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_MEMSYS3) -+endif() -+ -+if (ENABLE_FTS3) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_FTS3") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_FTS3) -+endif() -+ -+if (ENABLE_FTS4) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_FTS4") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_FTS4) -+endif() -+ -+if (ENABLE_FTS5) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_FTS5") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_FTS5) -+endif() -+ -+if (ENABLE_UPDATE_LIMIT) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_UPDATE_DELETE_LIMIT) -+endif() -+ -+if (ENABLE_RTREE) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_RTREE") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_RTREE) -+endif() -+ -+if (ENABLE_SESSION) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK") -+ target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_SESSION SQLITE_ENABLE_PREUPDATE_HOOK) -+endif() -+ -+if (NOT WIN32) -+ if (ENABLE_LOAD_EXTENSION) -+ foreach (LIB IN LISTS CMAKE_DL_LIBS) -+ string(APPEND PKGCONFIG_LIBS_PRIVATE " -l${LIB}") -+ endforeach () -+ endif () -+ -+ if (ENABLE_FTS5 OR ENABLE_MATH) -+ find_library(HAVE_LIBM m) -+ if (HAVE_LIBM) -+ target_link_libraries(sqlite3 PRIVATE m) -+ string(APPEND PKGCONFIG_LIBS_PRIVATE " -lm") -+ endif() -+ endif() -+ -+ include(CheckIncludeFile) -+ include(CheckIncludeFiles) -+ include(CheckTypeSize) -+ include(CheckSymbolExists) -+ -+ # Corresponds to AC_CHECK_TYPES -+ check_type_size(int8_t INT8_T) -+ check_type_size(int16_t INT16_T) -+ check_type_size(int32_t INT32_T) -+ check_type_size(int64_t INT64_T) -+ check_type_size(intptr_t INTPTR_T) -+ check_type_size(uint8_t UINT8_T) -+ check_type_size(uint16_t UINT16_T) -+ check_type_size(uint32_t UINT32_T) -+ check_type_size(uint64_t UINT64_T) -+ check_type_size(uintptr_t UINTPTR_T) -+ -+ # Corresponds to STDC_HEADERS in configure -+ # The value doesn't seem to be used anywhere but is in the config -+ check_include_files("stdlib.h;stddef.h" STDC_HEADERS) -+ -+ # Corresponds to AC_CHECK_HEADERS -+ check_include_file(sys/types.h HAVE_SYS_TYPES_H) -+ check_include_file(stdlib.h HAVE_STDLIB_H) -+ check_include_file(stdint.h HAVE_STDINT_H) -+ check_include_file(inttypes.h HAVE_INTTYPES_H) -+ check_include_file(malloc.h HAVE_MALLOC_H) -+ -+ # Additional headers from AC_CHECK_FUNCS -+ check_include_file(unistd.h HAVE_UNISTD_H) -+ check_include_file(string.h HAVE_STRING_H) -+ -+ # Corresponds to AC_CHECK_FUNCS -+ check_symbol_exists(fdatasync unistd.h HAVE_FDATASYNC) -+ check_symbol_exists(gmtime_r time.h HAVE_GMTIME_R) -+ check_symbol_exists(isnan math.h HAVE_ISNAN) -+ check_symbol_exists(localtime_r time.h HAVE_LOCALTIME_R) -+ check_symbol_exists(localtime_s time.h HAVE_LOCALTIME_S) -+ check_symbol_exists(malloc_usable_size malloc.h HAVE_MALLOC_USABLE_SIZE) -+ check_symbol_exists(strchrnul string.h HAVE_STRCHRNUL) -+ check_symbol_exists(usleep unistd.h HAVE_USLEEP) -+ check_symbol_exists(utime unistd.h HAVE_UTIME) -+ check_symbol_exists(pread unistd.h HAVE_PREAD) -+ check_symbol_exists(pread64 unistd.h HAVE_PREAD64) -+ check_symbol_exists(pwrite unistd.h HAVE_PWRITE) -+ check_symbol_exists(pwrite64 unistd.h HAVE_PWRITE64) -+ -+ configure_file( -+ ${CMAKE_CURRENT_SOURCE_DIR}/sqlite_cfg.h.cmake -+ ${CMAKE_CURRENT_BINARY_DIR}/sqlite_cfg.h -+ ) -+ -+ target_include_directories(sqlite3 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -+ target_compile_definitions(sqlite3 PRIVATE _HAVE_SQLITE_CONFIG_H) -+endif () -+ -+if (BUILD_SHARED_LIBS) -+ if (WIN32) -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_API=__declspec(dllimport)") -+ target_compile_definitions(sqlite3 PRIVATE "SQLITE_API=__declspec(dllexport)") -+ target_compile_definitions(sqlite3 INTERFACE "SQLITE_API=__declspec(dllimport)") -+ else() -+ string(APPEND PKGCONFIG_DEFINES " -DSQLITE_API=__attribute__((visibility(\"default\")))") -+ target_compile_definitions(sqlite3 PUBLIC "SQLITE_API=__attribute__((visibility(\"default\")))") -+ endif() -+endif() -+ -+set(sqlite-targets sqlite3) -+ -+if (ENABLE_SHELL) -+ add_executable(sqlite3-bin shell.c) -+ -+ target_link_libraries(sqlite3-bin PRIVATE sqlite3) -+ if (WITH_ZLIB) -+ find_package(ZLIB REQUIRED) -+ target_link_libraries(sqlite3-bin PRIVATE ZLIB::ZLIB) -+ target_compile_definitions(sqlite3-bin PRIVATE SQLITE_HAVE_ZLIB) -+ endif() -+ -+ list(APPEND sqlite-targets sqlite3-bin) -+endif () -+ -+include(GNUInstallDirs) -+ -+install( -+ TARGETS ${sqlite-targets} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+) -+ -+install( -+ FILES sqlite3.h sqlite3ext.h -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -+ -+set(PKGCONFIG_VERSION ${CMAKE_PROJECT_VERSION}) -+configure_file(sqlite3.pc.cmake sqlite3.pc @ONLY) -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sqlite3.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") -diff --git a/sqlite3.pc.cmake b/sqlite3.pc.cmake -new file mode 100644 -index 0000000000..c7ecbf1a54 ---- /dev/null -+++ b/sqlite3.pc.cmake -@@ -0,0 +1,11 @@ -+prefix=@CMAKE_INSTALL_PREFIX@ -+exec_prefix=${prefix} -+libdir=${prefix}/lib -+includedir=${prefix}/include -+ -+Name: SQLite -+Description: SQL database engine -+Version: @PKGCONFIG_VERSION@ -+Libs: -L${libdir} -lsqlite3 -+Libs.private: @PKGCONFIG_LIBS_PRIVATE@ -+Cflags: -I${includedir} @PKGCONFIG_DEFINES@ -diff --git a/sqlite_cfg.h.cmake b/sqlite_cfg.h.cmake -new file mode 100644 -index 0000000000..2dde3123c4 ---- /dev/null -+++ b/sqlite_cfg.h.cmake -@@ -0,0 +1,142 @@ -+/* sqlite_cfg.h.in. Generated from configure.ac by autoheader. */ -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_DLFCN_H 1 -+ -+/* Define to 1 if you have the `fdatasync' function. */ -+#cmakedefine HAVE_FDATASYNC 1 -+ -+/* Define to 1 if you have the `gmtime_r' function. */ -+#cmakedefine HAVE_GMTIME_R 1 -+ -+/* Define to 1 if the system has the type `int16_t'. */ -+#cmakedefine HAVE_INT16_T 1 -+ -+/* Define to 1 if the system has the type `int32_t'. */ -+#cmakedefine HAVE_INT32_T 1 -+ -+/* Define to 1 if the system has the type `int64_t'. */ -+#cmakedefine HAVE_INT64_T 1 -+ -+/* Define to 1 if the system has the type `int8_t'. */ -+#cmakedefine HAVE_INT8_T 1 -+ -+/* Define to 1 if the system has the type `intptr_t'. */ -+#cmakedefine HAVE_INTPTR_T 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_INTTYPES_H 1 -+ -+/* Define to 1 if you have the `isnan' function. */ -+#cmakedefine HAVE_ISNAN 1 -+ -+/* Define to 1 if you have the `localtime_r' function. */ -+#cmakedefine HAVE_LOCALTIME_R 1 -+ -+/* Define to 1 if you have the `localtime_s' function. */ -+#cmakedefine HAVE_LOCALTIME_S 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_MALLOC_H 1 -+ -+/* Define to 1 if you have the `malloc_usable_size' function. */ -+#cmakedefine HAVE_MALLOC_USABLE_SIZE 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_MEMORY_H 1 -+ -+/* Define to 1 if you have the `pread' function. */ -+#cmakedefine HAVE_PREAD 1 -+ -+/* Define to 1 if you have the `pread64' function. */ -+#cmakedefine HAVE_PREAD64 1 -+ -+/* Define to 1 if you have the `pwrite' function. */ -+#cmakedefine HAVE_PWRITE 1 -+ -+/* Define to 1 if you have the `pwrite64' function. */ -+#cmakedefine HAVE_PWRITE64 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_STDINT_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_STDLIB_H 1 -+ -+/* Define to 1 if you have the `strchrnul' function. */ -+#cmakedefine HAVE_STRCHRNUL 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_STRINGS_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_STRING_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_SYS_STAT_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_SYS_TYPES_H 1 -+ -+/* Define to 1 if the system has the type `uint16_t'. */ -+#cmakedefine HAVE_UINT16_T 1 -+ -+/* Define to 1 if the system has the type `uint32_t'. */ -+#cmakedefine HAVE_UINT32_T 1 -+ -+/* Define to 1 if the system has the type `uint64_t'. */ -+#cmakedefine HAVE_UINT64_T 1 -+ -+/* Define to 1 if the system has the type `uint8_t'. */ -+#cmakedefine HAVE_UINT8_T 1 -+ -+/* Define to 1 if the system has the type `uintptr_t'. */ -+#cmakedefine HAVE_UINTPTR_T 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_UNISTD_H 1 -+ -+/* Define to 1 if you have the `usleep' function. */ -+#cmakedefine HAVE_USLEEP 1 -+ -+/* Define to 1 if you have the `utime' function. */ -+#cmakedefine HAVE_UTIME 1 -+ -+/* Define to 1 if you have the header file. */ -+#cmakedefine HAVE_ZLIB_H 1 -+ -+/* Define to the sub-directory in which libtool stores uninstalled libraries. -+ */ -+#cmakedefine LT_OBJDIR @LT_OBJDIR@ -+ -+/* Define to the address where bug reports for this package should be sent. */ -+#cmakedefine PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@ -+ -+/* Define to the full name of this package. */ -+#cmakedefine PACKAGE_NAME @PACKAGE_NAME@ -+ -+/* Define to the full name and version of this package. */ -+#cmakedefine PACKAGE_STRING @PACKAGE_STRING@ -+ -+/* Define to the one symbol short name of this package. */ -+#cmakedefine PACKAGE_TARNAME @PACKAGE_TARNAME@ -+ -+/* Define to the home page for this package. */ -+#cmakedefine PACKAGE_URL @PACKAGE_URL@ -+ -+/* Define to the version of this package. */ -+#cmakedefine PACKAGE_VERSION @PACKAGE_VERSION@ -+ -+/* Define to 1 if you have the ANSI C header files. */ -+#cmakedefine STDC_HEADERS 1 -+ -+/* Enable large inode numbers on Mac OS X 10.5. */ -+#ifndef _DARWIN_USE_64_BIT_INODE -+# define _DARWIN_USE_64_BIT_INODE 1 -+#endif -+ -+/* Number of bits in a file offset, on hosts where this is settable. */ -+#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@ -+ -+/* Define for large files, on AIX-style hosts. */ -+#cmakedefine _LARGE_FILES --- -2.47.0.windows.1 diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake deleted file mode 100644 index 99d0dfaf..00000000 --- a/ports/sqlite3/portfile.cmake +++ /dev/null @@ -1,46 +0,0 @@ -set(VERSION 3.47.00) -string(REPLACE "." "" TAG ${VERSION}) -string(CONCAT TAG ${TAG} "00") - -set(FILENAME "sqlite-amalgamation-${TAG}.zip") -# URL needs to be iterated every year -set(URLS "https://sqlite.org/2024/${FILENAME}") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 3ee88204cd12a20b649fe53ca5dbe97b2c36436f9de00b4c010d0f221a0d00df7653acbd9c4cbd2d85b568be804499b9879463748dc5d097aa35fa08606efa84 -) - -# Patches -set(PATCHES - ${CMAKE_CURRENT_LIST_DIR}/patches/0001-Add-CMake-build.patch -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DENABLE_FTS3=ON - -DENABLE_LOAD_EXTENSION=OFF - -DENABLE_RTREE=ON - -DENABLE_THREADSAFE=ON -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/version ${VERSION}) diff --git a/ports/sqlite3/vcpkg.json b/ports/sqlite3/vcpkg.json deleted file mode 100644 index 51599572..00000000 --- a/ports/sqlite3/vcpkg.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "sqlite3", - "version": "3.47.0", - "description": "SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private.", - "homepage": "https://sqlite.org", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/vcpkg-cmake-webkit/portfile.cmake b/ports/vcpkg-cmake-webkit/portfile.cmake deleted file mode 100644 index 8ab76919..00000000 --- a/ports/vcpkg-cmake-webkit/portfile.cmake +++ /dev/null @@ -1,13 +0,0 @@ -if(NOT TARGET_TRIPLET STREQUAL _HOST_TRIPLET) - # make FATAL_ERROR in CI when issue #16773 fixed - message(WARNING "vcpkg-cmake-webkit is a host-only port; please mark it as a host port in your dependencies.") -endif() - -file(INSTALL - "${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup_webkit.cmake" - "${CMAKE_CURRENT_LIST_DIR}/vcpkg_fixup_pkgconfig_webkit.cmake" - "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" - #"${CMAKE_CURRENT_LIST_DIR}/copyright" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") - -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/vcpkg-cmake-webkit/vcpkg-port-config.cmake b/ports/vcpkg-cmake-webkit/vcpkg-port-config.cmake deleted file mode 100644 index d55568f8..00000000 --- a/ports/vcpkg-cmake-webkit/vcpkg-port-config.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup_webkit.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_fixup_pkgconfig_webkit.cmake") diff --git a/ports/vcpkg-cmake-webkit/vcpkg.json b/ports/vcpkg-cmake-webkit/vcpkg.json deleted file mode 100644 index da540319..00000000 --- a/ports/vcpkg-cmake-webkit/vcpkg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "vcpkg-cmake-webkit", - "version-date": "2023-09-14" -} diff --git a/ports/vcpkg-cmake-webkit/vcpkg_cmake_config_fixup_webkit.cmake b/ports/vcpkg-cmake-webkit/vcpkg_cmake_config_fixup_webkit.cmake deleted file mode 100644 index 4db40f13..00000000 --- a/ports/vcpkg-cmake-webkit/vcpkg_cmake_config_fixup_webkit.cmake +++ /dev/null @@ -1,35 +0,0 @@ -include_guard(GLOBAL) - -function(_remove_empty_directory) - file(GLOB directory_files "${ARGV0}/*") - list(LENGTH directory_files file_count) - if (file_count EQUAL 0) - file(REMOVE_RECURSE "${ARGV0}") - cmake_path(GET ARGV0 PARENT_PATH parent_path) - _remove_empty_directory(${parent_path}) - endif () -endfunction() - -function(vcpkg_cmake_config_fixup) - if (NOT VCPKG_DISABLE_CMAKE_FIXUP) - _vcpkg_cmake_config_fixup(${ARGV}) - return() - endif () - - message(STATUS "Fixing CMake config files disabled. Files will be removed!") - cmake_parse_arguments(PARSE_ARGV 0 "arg" "" "PACKAGE_NAME;CONFIG_PATH" "") - - if(NOT arg_PACKAGE_NAME) - set(arg_PACKAGE_NAME "${PORT}") - endif() - if(NOT arg_CONFIG_PATH) - set(arg_CONFIG_PATH "share/${arg_PACKAGE_NAME}") - endif() - - file(GLOB cmake_files "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}/*.cmake") - file(GLOB cmake_debug_files "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}/*.cmake") - file(REMOVE ${cmake_files} ${cmake_debug_files}) - - _remove_empty_directory("${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}") - _remove_empty_directory("${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}") -endfunction() diff --git a/ports/vcpkg-cmake-webkit/vcpkg_fixup_pkgconfig_webkit.cmake b/ports/vcpkg-cmake-webkit/vcpkg_fixup_pkgconfig_webkit.cmake deleted file mode 100644 index 1c879acb..00000000 --- a/ports/vcpkg-cmake-webkit/vcpkg_fixup_pkgconfig_webkit.cmake +++ /dev/null @@ -1,11 +0,0 @@ -include_guard(GLOBAL) - -function(vcpkg_fixup_pkgconfig) - if (NOT VCPKG_DISABLE_PKGCONFIG_FIXUP) - _vcpkg_fixup_pkgconfig() - else () - message(STATUS "Fixing pkgconfig files disabled. Files will be removed!") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") - endif () -endfunction() diff --git a/ports/vcpkg-tool-meson/0001-Detect-clang-cl-by-binary-name-on-non-Windows-hosts.patch b/ports/vcpkg-tool-meson/0001-Detect-clang-cl-by-binary-name-on-non-Windows-hosts.patch new file mode 100644 index 00000000..762c5967 --- /dev/null +++ b/ports/vcpkg-tool-meson/0001-Detect-clang-cl-by-binary-name-on-non-Windows-hosts.patch @@ -0,0 +1,31 @@ +--- meson-1.9.0/mesonbuild/compilers/detect.py 2025-08-24 12:24:15.000000000 -0400 ++++ meson-1.9.0-patched/mesonbuild/compilers/detect.py 2026-02-05 21:55:31.816774859 -0500 +@@ -452,6 +452,28 @@ + full_version=full_version, linker=linker) + + if 'clang' in out or 'Clang' in out: ++ # On Linux, clang-cl doesn't output "CL.EXE COMPATIBILITY" so the ++ # earlier check misses it. Detect by binary name and redirect to ++ # the ClangCl handler. ++ compiler_name = os.path.basename(compiler[0]) ++ if 'clang-cl' in compiler_name and env.machines[for_machine].is_windows(): ++ arg = '--version' ++ try: ++ p, out, err = Popen_safe(compiler + [arg]) ++ except OSError as e: ++ popen_exceptions[join_args(compiler + [arg])] = e ++ version = search_version(out) ++ match = re.search('^Target: (.*?)-', out, re.MULTILINE) ++ target = match.group(1) if match else 'unknown target' ++ cls = c.ClangClCCompiler if lang == 'c' else cpp.ClangClCPPCompiler ++ # Use the linker from the cross file (c_ld), falling back to lld-link ++ ld_entry = env.lookup_binary_entry(for_machine, lang + '_ld') ++ linker_cmd = ld_entry if ld_entry is not None else ['lld-link'] ++ linker = guess_win_linker(env, linker_cmd, cls, version, for_machine) ++ return cls( ++ compiler, version, for_machine, is_cross, info, target, ++ linker=linker) ++ + linker = None + + defines = _get_clang_compiler_defines(compiler, lang) diff --git a/ports/vcpkg-tool-meson/0002-Pass-fuse-ld-to-clang-cl-for-correct-linker-selectio.patch b/ports/vcpkg-tool-meson/0002-Pass-fuse-ld-to-clang-cl-for-correct-linker-selectio.patch new file mode 100644 index 00000000..b455490f --- /dev/null +++ b/ports/vcpkg-tool-meson/0002-Pass-fuse-ld-to-clang-cl-for-correct-linker-selectio.patch @@ -0,0 +1,18 @@ +--- meson-1.9.0/mesonbuild/compilers/mixins/visualstudio.py 2025-08-24 12:24:15.000000000 -0400 ++++ meson-1.9.0-patched/mesonbuild/compilers/mixins/visualstudio.py 2026-02-05 21:55:49.130235239 -0500 +@@ -480,7 +480,14 @@ + def linker_to_compiler_args(self, args: T.List[str]) -> T.List[str]: + # clang-cl forwards arguments span-wise with the /LINK flag + # therefore -Wl will be received by lld-link or LINK and rejected +- return super().use_linker_args(self.linker.id, '') + super().linker_to_compiler_args([flag[4:] if flag.startswith('-Wl,') else flag for flag in args]) ++ # Tell clang-cl which linker binary to use via -fuse-ld so that ++ # on non-Windows hosts it doesn't fall back to /usr/bin/ld. ++ import os ++ ld_args: T.List[str] = [] ++ if hasattr(self.linker, 'exelist') and self.linker.exelist: ++ ld_name = os.path.basename(self.linker.exelist[0]) ++ ld_args = [f'-fuse-ld={ld_name}'] ++ return ld_args + super().linker_to_compiler_args([flag[4:] if flag.startswith('-Wl,') else flag for flag in args]) + + def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]: + if dep.get_include_type() == 'system': diff --git a/ports/vcpkg-tool-meson/adjust-args.patch b/ports/vcpkg-tool-meson/adjust-args.patch new file mode 100644 index 00000000..fded3153 --- /dev/null +++ b/ports/vcpkg-tool-meson/adjust-args.patch @@ -0,0 +1,13 @@ +diff --git a/mesonbuild/cmake/toolchain.py b/mesonbuild/cmake/toolchain.py +index 11a00be5d..89ae490ff 100644 +--- a/mesonbuild/cmake/toolchain.py ++++ b/mesonbuild/cmake/toolchain.py +@@ -202,7 +202,7 @@ class CMakeToolchain: + @staticmethod + def is_cmdline_option(compiler: 'Compiler', arg: str) -> bool: + if compiler.get_argument_syntax() == 'msvc': +- return arg.startswith('/') ++ return arg.startswith(('/','-')) + else: + if os.path.basename(compiler.get_exe()) == 'zig' and arg in {'ar', 'cc', 'c++', 'dlltool', 'lib', 'ranlib', 'objcopy', 'rc'}: + return True diff --git a/ports/vcpkg-tool-meson/adjust-python-dep.patch b/ports/vcpkg-tool-meson/adjust-python-dep.patch new file mode 100644 index 00000000..0cbfe717 --- /dev/null +++ b/ports/vcpkg-tool-meson/adjust-python-dep.patch @@ -0,0 +1,45 @@ +diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py +index 883a29a..d9a82af 100644 +--- a/mesonbuild/dependencies/python.py ++++ b/mesonbuild/dependencies/python.py +@@ -232,8 +232,10 @@ class _PythonDependencyBase(_Base): + else: + if self.is_freethreaded: + libpath = Path('libs') / f'python{vernum}t.lib' ++ libpath = Path('libs') / f'..' / f'..' / f'..' / f'lib' / f'python{vernum}t.lib' + else: + libpath = Path('libs') / f'python{vernum}.lib' ++ libpath = Path('libs') / f'..' / f'..' / f'..' / f'lib' / f'python{vernum}.lib' + # For a debug build, pyconfig.h may force linking with + # pythonX_d.lib (see meson#10776). This cannot be avoided + # and won't work unless we also have a debug build of +@@ -250,6 +252,8 @@ class _PythonDependencyBase(_Base): + vscrt = self.env.coredata.optstore.get_value('b_vscrt') + if vscrt in {'mdd', 'mtd', 'from_buildtype', 'static_from_buildtype'}: + vscrt_debug = True ++ if is_debug_build: ++ libpath = Path('libs') / f'..' / f'..' / f'..' / f'debug/lib' / f'python{vernum}_d.lib' + if is_debug_build and vscrt_debug and not self.variables.get('Py_DEBUG'): + mlog.warning(textwrap.dedent('''\ + Using a debug build type with MSVC or an MSVC-compatible compiler +@@ -350,9 +354,10 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase): + self.is_found = True + + # compile args ++ verdot = self.variables.get('py_version_short') + inc_paths = mesonlib.OrderedSet([ + self.variables.get('INCLUDEPY'), +- self.paths.get('include'), ++ self.paths.get('include') + f'/../../../include/python${verdot}', + self.paths.get('platinclude')]) + + self.compile_args += ['-I' + path for path in inc_paths if path] +@@ -416,7 +421,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', + candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation)) + # We only need to check both, if a python install has a LIBPC. It might point to the wrong location, + # e.g. relocated / cross compilation, but the presence of LIBPC indicates we should definitely look for something. +- if pkg_libdir is not None: ++ if True or pkg_libdir is not None: + candidates.append(functools.partial(PythonPkgConfigDependency, pkg_name, env, kwargs, installation)) + else: + candidates.append(functools.partial(PkgConfigDependency, 'python3', env, kwargs)) diff --git a/ports/vcpkg-tool-meson/install.cmake b/ports/vcpkg-tool-meson/install.cmake new file mode 100644 index 00000000..84201aa1 --- /dev/null +++ b/ports/vcpkg-tool-meson/install.cmake @@ -0,0 +1,5 @@ +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/meson") +file(INSTALL "${SOURCE_PATH}/meson.py" + "${SOURCE_PATH}/mesonbuild" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/meson" +) diff --git a/ports/vcpkg-tool-meson/meson-56879d5.diff b/ports/vcpkg-tool-meson/meson-56879d5.diff new file mode 100644 index 00000000..9c012040 --- /dev/null +++ b/ports/vcpkg-tool-meson/meson-56879d5.diff @@ -0,0 +1,24 @@ +diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py +index 8d7dd0bbf756..f1fa777d179a 100644 +--- a/mesonbuild/msetup.py ++++ b/mesonbuild/msetup.py +@@ -16,6 +16,7 @@ + if T.TYPE_CHECKING: + from typing_extensions import Protocol + from .coredata import SharedCMDOptions ++ from .interpreter import SubprojectHolder + + class CMDOptions(SharedCMDOptions, Protocol): + +@@ -192,9 +193,9 @@ def generate(self, capture: bool = False, vslite_ctx: T.Optional[dict] = None) - + 'Some other Meson process is already using this build directory. Exiting.'): + return self._generate(env, capture, vslite_ctx) + +- def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options: T.Dict[OptionKey, str], all_subprojects: T.Mapping[str, object]) -> None: ++ def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options: T.Dict[OptionKey, str], all_subprojects: T.Mapping[str, SubprojectHolder]) -> None: + errlist: T.List[str] = [] +- known_subprojects = all_subprojects.keys() ++ known_subprojects = [name for name, obj in all_subprojects.items() if obj.found()] + for opt in cmd_line_options: + # Accept options that exist or could appear in subsequent reconfigurations, + # including options for subprojects that were not used diff --git a/ports/vcpkg-tool-meson/meson-intl.patch b/ports/vcpkg-tool-meson/meson-intl.patch new file mode 100644 index 00000000..8f2a029d --- /dev/null +++ b/ports/vcpkg-tool-meson/meson-intl.patch @@ -0,0 +1,13 @@ +diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py +--- a/mesonbuild/dependencies/misc.py ++++ b/mesonbuild/dependencies/misc.py +@@ -593,7 +593,8 @@ iconv_factory = DependencyFactory( + + packages['intl'] = intl_factory = DependencyFactory( + 'intl', ++ [DependencyMethods.BUILTIN, DependencyMethods.SYSTEM, DependencyMethods.CMAKE], ++ cmake_name='Intl', +- [DependencyMethods.BUILTIN, DependencyMethods.SYSTEM], + builtin_class=IntlBuiltinDependency, + system_class=IntlSystemDependency, + ) diff --git a/ports/vcpkg-tool-meson/meson.template.in b/ports/vcpkg-tool-meson/meson.template.in new file mode 100644 index 00000000..fb8d0843 --- /dev/null +++ b/ports/vcpkg-tool-meson/meson.template.in @@ -0,0 +1,43 @@ +[binaries] +cmake = ['@CMAKE_COMMAND@'] +ninja = ['@NINJA@'] +pkg-config = ['@PKGCONFIG@'] +@MESON_MT@ +@MESON_AR@ +@MESON_RC@ +@MESON_C@ +@MESON_C_LD@ +@MESON_CXX@ +@MESON_CXX_LD@ +@MESON_OBJC@ +@MESON_OBJC_LD@ +@MESON_OBJCPP@ +@MESON_OBJCPP_LD@ +@MESON_FC@ +@MESON_FC_LD@ +@MESON_WINDRES@ +@MESON_ADDITIONAL_BINARIES@ +[properties] +cmake_toolchain_file = '@SCRIPTS@/buildsystems/vcpkg.cmake' +@MESON_ADDITIONAL_PROPERTIES@ +[cmake] +CMAKE_BUILD_TYPE = '@MESON_CMAKE_BUILD_TYPE@' +VCPKG_TARGET_TRIPLET = '@TARGET_TRIPLET@' +VCPKG_HOST_TRIPLET = '@_HOST_TRIPLET@' +VCPKG_CHAINLOAD_TOOLCHAIN_FILE = '@VCPKG_CHAINLOAD_TOOLCHAIN_FILE@' +VCPKG_CRT_LINKAGE = '@VCPKG_CRT_LINKAGE@' +_VCPKG_INSTALLED_DIR = '@_VCPKG_INSTALLED_DIR@' +@MESON_HOST_MACHINE@ +@MESON_BUILD_MACHINE@ +[built-in options] +default_library = '@MESON_DEFAULT_LIBRARY@' +werror = false +@MESON_CFLAGS@ +@MESON_CXXFLAGS@ +@MESON_FCFLAGS@ +@MESON_OBJCFLAGS@ +@MESON_OBJCPPFLAGS@ +# b_vscrt +@MESON_VSCRT_LINKAGE@ +# c_winlibs/cpp_winlibs +@MESON_WINLIBS@ \ No newline at end of file diff --git a/ports/vcpkg-tool-meson/portfile.cmake b/ports/vcpkg-tool-meson/portfile.cmake new file mode 100644 index 00000000..25d99ab3 --- /dev/null +++ b/ports/vcpkg-tool-meson/portfile.cmake @@ -0,0 +1,46 @@ +# This port represents a dependency on the Meson build system. +# In the future, it is expected that this port acquires and installs Meson. +# Currently is used in ports that call vcpkg_find_acquire_program(MESON) in order to force rebuilds. + +set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled) + +set(patches + meson-intl.patch + adjust-python-dep.patch + adjust-args.patch + remove-pkgconfig-specialization.patch + meson-56879d5.diff # Remove with 1.9.1 + 0001-Detect-clang-cl-by-binary-name-on-non-Windows-hosts.patch + 0002-Pass-fuse-ld-to-clang-cl-for-correct-linker-selectio.patch +) +set(scripts + vcpkg-port-config.cmake + vcpkg_configure_meson.cmake + vcpkg_install_meson.cmake + meson.template.in +) +set(to_hash + "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" + "${CMAKE_CURRENT_LIST_DIR}/portfile.cmake" +) +foreach(file IN LISTS patches scripts) + set(filepath "${CMAKE_CURRENT_LIST_DIR}/${file}") + list(APPEND to_hash "${filepath}") + file(COPY "${filepath}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +endforeach() + +set(meson_path_hash "") +foreach(filepath IN LISTS to_hash) + file(SHA1 "${filepath}" to_append) + string(APPEND meson_path_hash "${to_append}") +endforeach() +string(SHA512 meson_path_hash "${meson_path_hash}") + +string(SUBSTRING "${meson_path_hash}" 0 6 MESON_SHORT_HASH) +list(TRANSFORM patches REPLACE [[^(..*)$]] [["${CMAKE_CURRENT_LIST_DIR}/\0"]]) +list(JOIN patches "\n " PATCHES) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY) + +vcpkg_install_copyright(FILE_LIST "${VCPKG_ROOT_DIR}/LICENSE.txt") + +include("${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake") diff --git a/ports/vcpkg-tool-meson/remove-pkgconfig-specialization.patch b/ports/vcpkg-tool-meson/remove-pkgconfig-specialization.patch new file mode 100644 index 00000000..adbd0b09 --- /dev/null +++ b/ports/vcpkg-tool-meson/remove-pkgconfig-specialization.patch @@ -0,0 +1,14 @@ +diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py +index bef14e9..fec595f 100644 +--- a/mesonbuild/modules/pkgconfig.py ++++ b/mesonbuild/modules/pkgconfig.py +@@ -715,6 +715,9 @@ class PkgConfigModule(NewExtensionModule): + pcfile = filebase + '.pc' + pkgroot = pkgroot_name = kwargs['install_dir'] or default_install_dir + if pkgroot is None: ++ pkgroot = os.path.join(_as_str(state.environment.coredata.optstore.get_value_for(OptionKey('libdir'))), 'pkgconfig') ++ pkgroot_name = os.path.join('{libdir}', 'pkgconfig') ++ elif False: + m = state.environment.machines.host + if m.is_freebsd(): + pkgroot = os.path.join(_as_str(state.environment.coredata.optstore.get_value_for(OptionKey('prefix'))), 'libdata', 'pkgconfig') diff --git a/ports/vcpkg-tool-meson/vcpkg-port-config.cmake b/ports/vcpkg-tool-meson/vcpkg-port-config.cmake new file mode 100644 index 00000000..8821b9d8 --- /dev/null +++ b/ports/vcpkg-tool-meson/vcpkg-port-config.cmake @@ -0,0 +1,62 @@ +include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake-get-vars/vcpkg-port-config.cmake") +# Overwrite builtin scripts +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_configure_meson.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_install_meson.cmake") + +set(meson_short_hash @MESON_SHORT_HASH@) + +# Setup meson: +set(program MESON) +set(program_version @VERSION@) +set(program_name meson) +set(search_names meson meson.py) +set(ref "${program_version}") +set(path_to_search "${DOWNLOADS}/tools/meson-${program_version}-${meson_short_hash}") +set(download_urls "https://github.com/mesonbuild/meson/archive/${ref}.tar.gz") +set(download_filename "meson-${ref}.tar.gz") +set(download_sha512 ecd69b6734be14c467f7db67dd88c0e57ebfad83ce3ddada131ff3e43ac964523e1083d7c7f3803033a9a76adbc32ad26dd2e3aca69884269000ca64130bde07) + +find_program(SCRIPT_MESON NAMES ${search_names} PATHS "${path_to_search}" NO_DEFAULT_PATH) # NO_DEFAULT_PATH due top patching + +if(NOT SCRIPT_MESON) + vcpkg_download_distfile(archive_path + URLS ${download_urls} + SHA512 "${download_sha512}" + FILENAME "${download_filename}" + ) + file(REMOVE_RECURSE "${path_to_search}") + file(REMOVE_RECURSE "${path_to_search}-tmp") + file(MAKE_DIRECTORY "${path_to_search}-tmp") + file(ARCHIVE_EXTRACT INPUT "${archive_path}" + DESTINATION "${path_to_search}-tmp" + #PATTERNS "**/mesonbuild/*" "**/*.py" + ) + z_vcpkg_apply_patches( + SOURCE_PATH "${path_to_search}-tmp/meson-${ref}" + PATCHES + @PATCHES@ + ) + file(MAKE_DIRECTORY "${path_to_search}") + file(RENAME "${path_to_search}-tmp/meson-${ref}/meson.py" "${path_to_search}/meson.py") + file(RENAME "${path_to_search}-tmp/meson-${ref}/mesonbuild" "${path_to_search}/mesonbuild") + file(REMOVE_RECURSE "${path_to_search}-tmp") + set(SCRIPT_MESON "${path_to_search}/meson.py") +endif() + +# Check required python version +vcpkg_find_acquire_program(PYTHON3) +vcpkg_execute_in_download_mode( + COMMAND "${PYTHON3}" --version + OUTPUT_VARIABLE version_contents + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" +) +string(REGEX MATCH [[[0-9]+\.[0-9]+\.[0-9]+]] python_ver "${version_contents}") + +set(min_required 3.7) +if(python_ver VERSION_LESS "${min_required}") + message(FATAL_ERROR "Found Python version '${python_ver} at ${PYTHON3}' is insufficient for meson. meson requires at least version '${min_required}'") +else() + message(STATUS "Found Python version '${python_ver} at ${PYTHON3}'") +endif() + +message(STATUS "Using meson: ${SCRIPT_MESON}") diff --git a/ports/vcpkg-tool-meson/vcpkg.json b/ports/vcpkg-tool-meson/vcpkg.json new file mode 100644 index 00000000..7d948a40 --- /dev/null +++ b/ports/vcpkg-tool-meson/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "vcpkg-tool-meson", + "version": "1.9.0", + "port-version": 3, + "description": "Meson build system", + "homepage": "https://github.com/mesonbuild/meson", + "license": "Apache-2.0", + "supports": "native", + "dependencies": [ + "vcpkg-cmake-get-vars" + ] +} diff --git a/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake b/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake new file mode 100644 index 00000000..c1750db1 --- /dev/null +++ b/ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake @@ -0,0 +1,494 @@ +function(z_vcpkg_meson_set_proglist_variables config_type) + if(VCPKG_TARGET_IS_WINDOWS) + set(proglist MT AR) + else() + set(proglist AR RANLIB STRIP NM OBJDUMP DLLTOOL MT) + endif() + foreach(prog IN LISTS proglist) + if(VCPKG_DETECTED_CMAKE_${prog}) + if(meson_${prog}) + string(TOUPPER "MESON_${meson_${prog}}" var_to_set) + set("${var_to_set}" "${meson_${prog}} = ['${VCPKG_DETECTED_CMAKE_${prog}}']" PARENT_SCOPE) + elseif(${prog} STREQUAL AR AND VCPKG_COMBINED_STATIC_LINKER_FLAGS_${config_type}) + # Probably need to move AR somewhere else + string(TOLOWER "${prog}" proglower) + z_vcpkg_meson_convert_compiler_flags_to_list(ar_flags "${VCPKG_COMBINED_STATIC_LINKER_FLAGS_${config_type}}") + list(PREPEND ar_flags "${VCPKG_DETECTED_CMAKE_${prog}}") + z_vcpkg_meson_convert_list_to_python_array(ar_flags ${ar_flags}) + set("MESON_AR" "${proglower} = ${ar_flags}" PARENT_SCOPE) + else() + string(TOUPPER "MESON_${prog}" var_to_set) + string(TOLOWER "${prog}" proglower) + set("${var_to_set}" "${proglower} = ['${VCPKG_DETECTED_CMAKE_${prog}}']" PARENT_SCOPE) + endif() + endif() + endforeach() + set(compilers "${arg_LANGUAGES}") + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND compilers RC) + endif() + set(meson_RC windres) + set(meson_Fortran fortran) + set(meson_CXX cpp) + foreach(prog IN LISTS compilers) + if(VCPKG_DETECTED_CMAKE_${prog}_COMPILER) + string(TOUPPER "MESON_${prog}" var_to_set) + if(meson_${prog}) + if(VCPKG_COMBINED_${prog}_FLAGS_${config_type}) + # Need compiler flags in prog vars for sanity check. + z_vcpkg_meson_convert_compiler_flags_to_list(${prog}flags "${VCPKG_COMBINED_${prog}_FLAGS_${config_type}}") + endif() + list(PREPEND ${prog}flags "${VCPKG_DETECTED_CMAKE_${prog}_COMPILER}") + list(FILTER ${prog}flags EXCLUDE REGEX "(-|/)nologo") # Breaks compiler detection otherwise + z_vcpkg_meson_convert_list_to_python_array(${prog}flags ${${prog}flags}) + set("${var_to_set}" "${meson_${prog}} = ${${prog}flags}" PARENT_SCOPE) + if (DEFINED VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID + AND NOT VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID MATCHES "^(GNU|Intel)$" + AND VCPKG_DETECTED_CMAKE_LINKER) + string(TOUPPER "MESON_${prog}_LD" var_to_set) + set(${var_to_set} "${meson_${prog}}_ld = ['${VCPKG_DETECTED_CMAKE_LINKER}']" PARENT_SCOPE) + endif() + else() + if(VCPKG_COMBINED_${prog}_FLAGS_${config_type}) + # Need compiler flags in prog vars for sanity check. + z_vcpkg_meson_convert_compiler_flags_to_list(${prog}flags "${VCPKG_COMBINED_${prog}_FLAGS_${config_type}}") + endif() + list(PREPEND ${prog}flags "${VCPKG_DETECTED_CMAKE_${prog}_COMPILER}") + list(FILTER ${prog}flags EXCLUDE REGEX "(-|/)nologo") # Breaks compiler detection otherwise + z_vcpkg_meson_convert_list_to_python_array(${prog}flags ${${prog}flags}) + string(TOLOWER "${prog}" proglower) + set("${var_to_set}" "${proglower} = ${${prog}flags}" PARENT_SCOPE) + if (DEFINED VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID + AND NOT VCPKG_DETECTED_CMAKE_${prog}_COMPILER_ID MATCHES "^(GNU|Intel)$" + AND VCPKG_DETECTED_CMAKE_LINKER) + string(TOUPPER "MESON_${prog}_LD" var_to_set) + set(${var_to_set} "${proglower}_ld = ['${VCPKG_DETECTED_CMAKE_LINKER}']" PARENT_SCOPE) + endif() + endif() + endif() + endforeach() +endfunction() + +function(z_vcpkg_meson_convert_compiler_flags_to_list out_var compiler_flags) + separate_arguments(cmake_list NATIVE_COMMAND "${compiler_flags}") + list(TRANSFORM cmake_list REPLACE ";" [[\\;]]) + set("${out_var}" "${cmake_list}" PARENT_SCOPE) +endfunction() + +function(z_vcpkg_meson_convert_list_to_python_array out_var) + z_vcpkg_function_arguments(flag_list 1) + vcpkg_list(REMOVE_ITEM flag_list "") # remove empty elements if any + vcpkg_list(JOIN flag_list "', '" flag_list) + set("${out_var}" "['${flag_list}']" PARENT_SCOPE) +endfunction() + +# Generates the required compiler properties for meson +function(z_vcpkg_meson_set_flags_variables config_type) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(libpath_flag /LIBPATH:) + else() + set(libpath_flag -L) + endif() + if(config_type STREQUAL "DEBUG") + set(path_suffix "/debug") + else() + set(path_suffix "") + endif() + + set(includepath "-I${CURRENT_INSTALLED_DIR}/include") + set(libpath "${libpath_flag}${CURRENT_INSTALLED_DIR}${path_suffix}/lib") + + foreach(lang IN LISTS arg_LANGUAGES) + z_vcpkg_meson_convert_compiler_flags_to_list(${lang}flags "${VCPKG_COMBINED_${lang}_FLAGS_${config_type}}") + if(lang MATCHES "^(C|CXX)$") + vcpkg_list(APPEND ${lang}flags "${includepath}") + endif() + z_vcpkg_meson_convert_list_to_python_array(${lang}flags ${${lang}flags}) + set(lang_mapping "${lang}") + if(lang STREQUAL "Fortran") + set(lang_mapping "FC") + endif() + string(TOLOWER "${lang_mapping}" langlower) + if(lang STREQUAL "CXX") + set(langlower cpp) + endif() + set(MESON_${lang_mapping}FLAGS "${langlower}_args = ${${lang}flags}\n") + set(linker_flags "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_${config_type}}") + z_vcpkg_meson_convert_compiler_flags_to_list(linker_flags "${linker_flags}") + vcpkg_list(APPEND linker_flags "${libpath}") + z_vcpkg_meson_convert_list_to_python_array(linker_flags ${linker_flags}) + string(APPEND MESON_${lang_mapping}FLAGS "${langlower}_link_args = ${linker_flags}\n") + set(MESON_${lang_mapping}FLAGS "${MESON_${lang_mapping}FLAGS}" PARENT_SCOPE) + endforeach() +endfunction() + +function(z_vcpkg_get_build_and_host_system build_system host_system is_cross) #https://mesonbuild.com/Cross-compilation.html + set(build_unknown FALSE) + if(CMAKE_HOST_WIN32) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(build_arch $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(build_arch $ENV{PROCESSOR_ARCHITECTURE}) + endif() + if(build_arch MATCHES "(amd|AMD)64") + set(build_cpu_fam x86_64) + set(build_cpu x86_64) + elseif(build_arch MATCHES "(x|X)86") + set(build_cpu_fam x86) + set(build_cpu i686) + elseif(build_arch MATCHES "^(ARM|arm)64$") + set(build_cpu_fam aarch64) + set(build_cpu armv8) + elseif(build_arch MATCHES "^(ARM|arm)$") + set(build_cpu_fam arm) + set(build_cpu armv7hl) + else() + if(NOT DEFINED VCPKG_MESON_CROSS_FILE OR NOT DEFINED VCPKG_MESON_NATIVE_FILE) + message(WARNING "Unsupported build architecture ${build_arch}! Please set VCPKG_MESON_(CROSS|NATIVE)_FILE to a meson file containing the build_machine entry!") + endif() + set(build_unknown TRUE) + endif() + elseif(CMAKE_HOST_UNIX) + # at this stage, CMAKE_HOST_SYSTEM_PROCESSOR is not defined + execute_process( + COMMAND uname -m + OUTPUT_VARIABLE MACHINE + OUTPUT_STRIP_TRAILING_WHITESPACE + COMMAND_ERROR_IS_FATAL ANY) + + if(CMAKE_HOST_SOLARIS) + execute_process( + COMMAND isainfo -k + OUTPUT_VARIABLE MACHINE + OUTPUT_STRIP_TRAILING_WHITESPACE + COMMAND_ERROR_IS_FATAL ANY) + endif() + + # Show real machine architecture to visually understand whether we are in a native Apple Silicon terminal or running under Rosetta emulation + debug_message("Machine: ${MACHINE}") + + if(MACHINE MATCHES "arm64|aarch64") + set(build_cpu_fam aarch64) + set(build_cpu armv8) + elseif(MACHINE MATCHES "armv7h?l") + set(build_cpu_fam arm) + set(build_cpu ${MACHINE}) + elseif(MACHINE MATCHES "x86_64|amd64") + set(build_cpu_fam x86_64) + set(build_cpu x86_64) + elseif(MACHINE MATCHES "x86|i686") + set(build_cpu_fam x86) + set(build_cpu i686) + elseif(MACHINE MATCHES "i386") + set(build_cpu_fam x86) + set(build_cpu i386) + elseif(MACHINE MATCHES "riscv64") + set(build_cpu_fam riscv64) + set(build_cpu riscv64) + elseif(MACHINE MATCHES "loongarch64") + set(build_cpu_fam loongarch64) + set(build_cpu loongarch64) + else() + # https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-tables.md#cpu-families + if(NOT DEFINED VCPKG_MESON_CROSS_FILE OR NOT DEFINED VCPKG_MESON_NATIVE_FILE) + message(WARNING "Unhandled machine: ${MACHINE}! Please set VCPKG_MESON_(CROSS|NATIVE)_FILE to a meson file containing the build_machine entry!") + endif() + set(build_unknown TRUE) + endif() + else() + if(NOT DEFINED VCPKG_MESON_CROSS_FILE OR NOT DEFINED VCPKG_MESON_NATIVE_FILE) + message(WARNING "Failed to detect the build architecture! Please set VCPKG_MESON_(CROSS|NATIVE)_FILE to a meson file containing the build_machine entry!") + endif() + set(build_unknown TRUE) + endif() + + set(build "[build_machine]\n") # Machine the build is performed on + string(APPEND build "endian = 'little'\n") + if(CMAKE_HOST_WIN32) + string(APPEND build "system = 'windows'\n") + elseif(CMAKE_HOST_APPLE) + string(APPEND build "system = 'darwin'\n") + elseif(CYGWIN) + string(APPEND build "system = 'cygwin'\n") + elseif(CMAKE_HOST_UNIX) + string(APPEND build "system = 'linux'\n") + else() + set(build_unknown TRUE) + endif() + + if(DEFINED build_cpu_fam) + string(APPEND build "cpu_family = '${build_cpu_fam}'\n") + endif() + if(DEFINED build_cpu) + string(APPEND build "cpu = '${build_cpu}'") + endif() + if(NOT build_unknown) + set(${build_system} "${build}" PARENT_SCOPE) + endif() + + set(host_unkown FALSE) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "(amd|AMD|x|X)64") + set(host_cpu_fam x86_64) + set(host_cpu x86_64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86") + set(host_cpu_fam x86) + set(host_cpu i686) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "riscv64") + set(host_cpu_fam riscv64) + set(host_cpu riscv64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)64$") + set(host_cpu_fam aarch64) + set(host_cpu armv8) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)$") + set(host_cpu_fam arm) + set(host_cpu armv7hl) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "loongarch64") + set(host_cpu_fam loongarch64) + set(host_cpu loongarch64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "wasm32") + set(host_cpu_fam wasm32) + set(host_cpu wasm32) + else() + if(NOT DEFINED VCPKG_MESON_CROSS_FILE OR NOT DEFINED VCPKG_MESON_NATIVE_FILE) + message(WARNING "Unsupported target architecture ${VCPKG_TARGET_ARCHITECTURE}! Please set VCPKG_MESON_(CROSS|NATIVE)_FILE to a meson file containing the host_machine entry!" ) + endif() + set(host_unkown TRUE) + endif() + + set(host "[host_machine]\n") # host=target in vcpkg. + string(APPEND host "endian = 'little'\n") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_TARGET_IS_MINGW OR VCPKG_TARGET_IS_UWP) + set(meson_system_name "windows") + else() + string(TOLOWER "${VCPKG_CMAKE_SYSTEM_NAME}" meson_system_name) + endif() + string(APPEND host "system = '${meson_system_name}'\n") + string(APPEND host "cpu_family = '${host_cpu_fam}'\n") + string(APPEND host "cpu = '${host_cpu}'") + if(NOT host_unkown) + set(${host_system} "${host}" PARENT_SCOPE) + endif() + + if(NOT build_cpu_fam MATCHES "${host_cpu_fam}" + OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_UWP + OR (VCPKG_TARGET_IS_WINDOWS AND NOT CMAKE_HOST_WIN32)) + set(${is_cross} TRUE PARENT_SCOPE) + endif() +endfunction() + +function(z_vcpkg_meson_setup_extra_windows_variables config_type) + ## b_vscrt + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(crt_type "mt") + else() + set(crt_type "md") + endif() + if(config_type STREQUAL "DEBUG") + set(crt_type "${crt_type}d") + endif() + set(MESON_VSCRT_LINKAGE "b_vscrt = '${crt_type}'" PARENT_SCOPE) + ## winlibs + separate_arguments(c_winlibs NATIVE_COMMAND "${VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES}") + separate_arguments(cpp_winlibs NATIVE_COMMAND "${VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES}") + z_vcpkg_meson_convert_list_to_python_array(c_winlibs ${c_winlibs}) + z_vcpkg_meson_convert_list_to_python_array(cpp_winlibs ${cpp_winlibs}) + set(MESON_WINLIBS "c_winlibs = ${c_winlibs}\n") + string(APPEND MESON_WINLIBS "cpp_winlibs = ${cpp_winlibs}") + set(MESON_WINLIBS "${MESON_WINLIBS}" PARENT_SCOPE) +endfunction() + +function(z_vcpkg_meson_setup_variables config_type) + set(meson_var_list VSCRT_LINKAGE WINLIBS MT AR RC C C_LD CXX CXX_LD OBJC OBJC_LD OBJCXX OBJCXX_LD FC FC_LD WINDRES CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS FCFLAGS SHARED_LINKER_FLAGS) + foreach(var IN LISTS meson_var_list) + set(MESON_${var} "") + endforeach() + + if(VCPKG_TARGET_IS_WINDOWS) + z_vcpkg_meson_setup_extra_windows_variables("${config_type}") + endif() + + z_vcpkg_meson_set_proglist_variables("${config_type}") + z_vcpkg_meson_set_flags_variables("${config_type}") + + foreach(var IN LISTS meson_var_list) + set(MESON_${var} "${MESON_${var}}" PARENT_SCOPE) + endforeach() +endfunction() + +function(vcpkg_generate_meson_cmd_args) + cmake_parse_arguments(PARSE_ARGV 0 arg + "" + "OUTPUT;CONFIG" + "OPTIONS;LANGUAGES;ADDITIONAL_BINARIES;ADDITIONAL_PROPERTIES" + ) + + if(NOT arg_LANGUAGES) + set(arg_LANGUAGES C CXX) + endif() + + vcpkg_list(JOIN arg_ADDITIONAL_BINARIES "\n" MESON_ADDITIONAL_BINARIES) + vcpkg_list(JOIN arg_ADDITIONAL_PROPERTIES "\n" MESON_ADDITIONAL_PROPERTIES) + + set(buildtype "${arg_CONFIG}") + + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + z_vcpkg_select_default_vcpkg_chainload_toolchain() + endif() + vcpkg_list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_LANGUAGES=${arg_LANGUAGES}") + vcpkg_cmake_get_vars(cmake_vars_file) + debug_message("Including cmake vars from: ${cmake_vars_file}") + include("${cmake_vars_file}") + + vcpkg_list(APPEND arg_OPTIONS --backend ninja --wrap-mode nodownload -Doptimization=plain) + + z_vcpkg_get_build_and_host_system(MESON_HOST_MACHINE MESON_BUILD_MACHINE IS_CROSS) + + if(arg_CONFIG STREQUAL "DEBUG") + set(suffix "dbg") + else() + string(SUBSTRING "${arg_CONFIG}" 0 3 suffix) + string(TOLOWER "${suffix}" suffix) + endif() + set(meson_input_file_${buildtype} "${CURRENT_BUILDTREES_DIR}/meson-${TARGET_TRIPLET}-${suffix}.log") + + if(IS_CROSS) + # VCPKG_CROSSCOMPILING is not used since it regresses a lot of ports in x64-windows-x triplets + # For consistency this should proably be changed in the future? + vcpkg_list(APPEND arg_OPTIONS --native "${SCRIPTS}/buildsystems/meson/none.txt") + vcpkg_list(APPEND arg_OPTIONS --cross "${meson_input_file_${buildtype}}") + else() + vcpkg_list(APPEND arg_OPTIONS --native "${meson_input_file_${buildtype}}") + endif() + + # User provided cross/native files + if(VCPKG_MESON_NATIVE_FILE) + vcpkg_list(APPEND arg_OPTIONS --native "${VCPKG_MESON_NATIVE_FILE}") + endif() + if(VCPKG_MESON_NATIVE_FILE_${buildtype}) + vcpkg_list(APPEND arg_OPTIONS --native "${VCPKG_MESON_NATIVE_FILE_${buildtype}}") + endif() + if(VCPKG_MESON_CROSS_FILE) + vcpkg_list(APPEND arg_OPTIONS --cross "${VCPKG_MESON_CROSS_FILE}") + endif() + if(VCPKG_MESON_CROSS_FILE_${buildtype}) + vcpkg_list(APPEND arg_OPTIONS --cross "${VCPKG_MESON_CROSS_FILE_${buildtype}}") + endif() + + vcpkg_list(APPEND arg_OPTIONS --libdir lib) # else meson install into an architecture describing folder + vcpkg_list(APPEND arg_OPTIONS --pkgconfig.relocatable) + + if(arg_CONFIG STREQUAL "RELEASE") + vcpkg_list(APPEND arg_OPTIONS -Ddebug=false --prefix "${CURRENT_PACKAGES_DIR}") + vcpkg_list(APPEND arg_OPTIONS "--pkg-config-path;['${CURRENT_INSTALLED_DIR}/lib/pkgconfig','${CURRENT_INSTALLED_DIR}/share/pkgconfig']") + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_list(APPEND arg_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}/share']") + else() + vcpkg_list(APPEND arg_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/debug']") + endif() + elseif(arg_CONFIG STREQUAL "DEBUG") + vcpkg_list(APPEND arg_OPTIONS -Ddebug=true --prefix "${CURRENT_PACKAGES_DIR}/debug" --includedir ../include) + vcpkg_list(APPEND arg_OPTIONS "--pkg-config-path;['${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig','${CURRENT_INSTALLED_DIR}/share/pkgconfig']") + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_list(APPEND arg_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/share']") + else() + vcpkg_list(APPEND arg_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}/debug','${CURRENT_INSTALLED_DIR}']") + endif() + else() + message(FATAL_ERROR "Unknown configuration. Only DEBUG and RELEASE are valid values.") + endif() + + # Allow overrides / additional configuration variables from triplets + if(DEFINED VCPKG_MESON_CONFIGURE_OPTIONS) + vcpkg_list(APPEND arg_OPTIONS ${VCPKG_MESON_CONFIGURE_OPTIONS}) + endif() + if(DEFINED VCPKG_MESON_CONFIGURE_OPTIONS_${buildtype}) + vcpkg_list(APPEND arg_OPTIONS ${VCPKG_MESON_CONFIGURE_OPTIONS_${buildtype}}) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MESON_DEFAULT_LIBRARY shared) + else() + set(MESON_DEFAULT_LIBRARY static) + endif() + set(MESON_CMAKE_BUILD_TYPE "${cmake_build_type_${buildtype}}") + z_vcpkg_meson_setup_variables(${buildtype}) + configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/meson.template.in" "${meson_input_file_${buildtype}}" @ONLY) + set("${arg_OUTPUT}" ${arg_OPTIONS} PARENT_SCOPE) +endfunction() + +function(vcpkg_configure_meson) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 arg + "NO_PKG_CONFIG" + "SOURCE_PATH" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;LANGUAGES;ADDITIONAL_BINARIES;ADDITIONAL_NATIVE_BINARIES;ADDITIONAL_CROSS_BINARIES;ADDITIONAL_PROPERTIES" + ) + + if(DEFINED arg_ADDITIONAL_NATIVE_BINARIES OR DEFINED arg_ADDITIONAL_CROSS_BINARIES) + message(WARNING "Options ADDITIONAL_(NATIVE|CROSS)_BINARIES have been deprecated. Only use ADDITIONAL_BINARIES!") + endif() + vcpkg_list(APPEND arg_ADDITIONAL_BINARIES ${arg_ADDITIONAL_NATIVE_BINARIES} ${arg_ADDITIONAL_CROSS_BINARIES}) + vcpkg_list(REMOVE_DUPLICATES arg_ADDITIONAL_BINARIES) + + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + vcpkg_find_acquire_program(MESON) + + get_filename_component(CMAKE_PATH "${CMAKE_COMMAND}" DIRECTORY) + vcpkg_add_to_path("${CMAKE_PATH}") # Make CMake invokeable for Meson + + vcpkg_find_acquire_program(NINJA) + + if(NOT arg_NO_PKG_CONFIG) + vcpkg_find_acquire_program(PKGCONFIG) + set(ENV{PKG_CONFIG} "${PKGCONFIG}") + endif() + + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON3_DIR}") + + set(buildtypes "") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(buildname "DEBUG") + set(cmake_build_type_${buildname} "Debug") + vcpkg_list(APPEND buildtypes "${buildname}") + set(path_suffix_${buildname} "debug/") + set(suffix_${buildname} "dbg") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(buildname "RELEASE") + set(cmake_build_type_${buildname} "Release") + vcpkg_list(APPEND buildtypes "${buildname}") + set(path_suffix_${buildname} "") + set(suffix_${buildname} "rel") + endif() + + # configure build + foreach(buildtype IN LISTS buildtypes) + message(STATUS "Configuring ${TARGET_TRIPLET}-${suffix_${buildtype}}") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${suffix_${buildtype}}") + + vcpkg_generate_meson_cmd_args( + OUTPUT cmd_args + CONFIG ${buildtype} + LANGUAGES ${arg_LANGUAGES} + OPTIONS ${arg_OPTIONS} ${arg_OPTIONS_${buildtype}} + ADDITIONAL_BINARIES ${arg_ADDITIONAL_BINARIES} + ADDITIONAL_PROPERTIES ${arg_ADDITIONAL_PROPERTIES} + ) + + vcpkg_execute_required_process( + COMMAND ${MESON} setup ${cmd_args} ${arg_SOURCE_PATH} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${suffix_${buildtype}}" + LOGNAME config-${TARGET_TRIPLET}-${suffix_${buildtype}} + SAVE_LOG_FILES + meson-logs/meson-log.txt + meson-info/intro-dependencies.json + meson-logs/install-log.txt + ) + + message(STATUS "Configuring ${TARGET_TRIPLET}-${suffix_${buildtype}} done") + endforeach() +endfunction() diff --git a/ports/vcpkg-tool-meson/vcpkg_install_meson.cmake b/ports/vcpkg-tool-meson/vcpkg_install_meson.cmake new file mode 100644 index 00000000..0351f271 --- /dev/null +++ b/ports/vcpkg-tool-meson/vcpkg_install_meson.cmake @@ -0,0 +1,71 @@ +function(vcpkg_install_meson) + cmake_parse_arguments(PARSE_ARGV 0 arg "ADD_BIN_TO_PATH" "" "") + + vcpkg_find_acquire_program(NINJA) + unset(ENV{DESTDIR}) # installation directory was already specified with '--prefix' option + + if(VCPKG_TARGET_IS_OSX) + vcpkg_backup_env_variables(VARS SDKROOT MACOSX_DEPLOYMENT_TARGET) + set(ENV{SDKROOT} "${VCPKG_DETECTED_CMAKE_OSX_SYSROOT}") + set(ENV{MACOSX_DEPLOYMENT_TARGET} "${VCPKG_DETECTED_CMAKE_OSX_DEPLOYMENT_TARGET}") + endif() + + foreach(buildtype IN ITEMS "debug" "release") + if(DEFINED VCPKG_BUILD_TYPE AND NOT VCPKG_BUILD_TYPE STREQUAL buildtype) + continue() + endif() + + if(buildtype STREQUAL "debug") + set(short_buildtype "dbg") + else() + set(short_buildtype "rel") + endif() + + message(STATUS "Package ${TARGET_TRIPLET}-${short_buildtype}") + if(arg_ADD_BIN_TO_PATH) + vcpkg_backup_env_variables(VARS PATH) + if(buildtype STREQUAL "debug") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + else() + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") + endif() + endif() + vcpkg_execute_required_process( + COMMAND "${NINJA}" install -v + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_buildtype}" + LOGNAME package-${TARGET_TRIPLET}-${short_buildtype} + ) + if(arg_ADD_BIN_TO_PATH) + vcpkg_restore_env_variables(VARS PATH) + endif() + endforeach() + + vcpkg_list(SET renamed_libs) + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static AND NOT VCPKG_TARGET_IS_MINGW) + # Meson names all static libraries lib.a which basically breaks the world + file(GLOB_RECURSE gen_libraries "${CURRENT_PACKAGES_DIR}*/**/lib*.a") + foreach(gen_library IN LISTS gen_libraries) + get_filename_component(libdir "${gen_library}" DIRECTORY) + get_filename_component(libname "${gen_library}" NAME) + string(REGEX REPLACE ".a$" ".lib" fixed_librawname "${libname}") + string(REGEX REPLACE "^lib" "" fixed_librawname "${fixed_librawname}") + file(RENAME "${gen_library}" "${libdir}/${fixed_librawname}") + # For cmake fixes. + string(REGEX REPLACE ".a$" "" origin_librawname "${libname}") + string(REGEX REPLACE ".lib$" "" fixed_librawname "${fixed_librawname}") + vcpkg_list(APPEND renamed_libs ${fixed_librawname}) + set(${librawname}_old ${origin_librawname}) + set(${librawname}_new ${fixed_librawname}) + endforeach() + file(GLOB_RECURSE cmake_files "${CURRENT_PACKAGES_DIR}*/*.cmake") + foreach(cmake_file IN LISTS cmake_files) + foreach(current_lib IN LISTS renamed_libs) + vcpkg_replace_string("${cmake_file}" "${${current_lib}_old}" "${${current_lib}_new}" IGNORE_UNCHANGED) + endforeach() + endforeach() + endif() + + if(VCPKG_TARGET_IS_OSX) + vcpkg_restore_env_variables(VARS SDKROOT MACOSX_DEPLOYMENT_TARGET) + endif() +endfunction() diff --git a/ports/woff2/portfile.cmake b/ports/woff2/portfile.cmake deleted file mode 100644 index f9eaa6f6..00000000 --- a/ports/woff2/portfile.cmake +++ /dev/null @@ -1,42 +0,0 @@ -set(VERSION 1.0.2) - -# The woff2 library does not support shared libraries -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(FILENAME "woff2-${VERSION}.zip") -set(URLS "https://github.com/google/woff2/archive/v${VERSION}.zip") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 4cb38d1daabe40cbede843c9338338590f1eed6843ba97f646a5abf8d64e814c5854561a8197157eeb267e252e316f67bef230afe4a2846cc734e0fdbd77de7e -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_fixup_pkgconfig() - -# Copy tools -file(COPY ${CURRENT_PACKAGES_DIR}/bin/ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/woff2) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/woff2) - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/woff2 RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/woff2/version ${VERSION}) diff --git a/ports/woff2/vcpkg.json b/ports/woff2/vcpkg.json deleted file mode 100644 index cd1192dd..00000000 --- a/ports/woff2/vcpkg.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "woff2", - "version": "1.0.2", - "description": "WOFF2 font compression reference code", - "homepage": "https://github.com/google/woff2", - "license": "MIT", - "dependencies": [ - "brotli", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } - ] -} diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 12820eaa..ab2304c1 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -1,39 +1,2 @@ -set(VERSION 2.2.2) - -set(FILENAME "zlib-ng-${VERSION}.zip") -set(URLS "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/${VERSION}.zip") - -# Get archive -vcpkg_download_distfile(ARCHIVE - URLS ${URLS} - FILENAME ${FILENAME} - SHA512 98586b3ce67bf481ccb94f3263340dffde10c3735218b0c60173a91fe931f4e40a772691c7d19b691a167ae9709f62efcc247c2711d15cf19ca3bd318cab9689 -) - -# Extract archive -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${VERSION} - PATCHES ${PATCHES} -) - -# Run CMake build -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DZLIB_COMPAT=ON - -DZLIB_ENABLE_TESTS=OFF - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZLIB) -vcpkg_fixup_pkgconfig() - -# Prepare distribution -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/zlib RENAME copyright) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/zlib/version "${VERSION}") +# Mapping zlib-ng to zlib +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/zlib/vcpkg.json b/ports/zlib/vcpkg.json index cc0b8aa0..92816096 100644 --- a/ports/zlib/vcpkg.json +++ b/ports/zlib/vcpkg.json @@ -1,21 +1,10 @@ { "name": "zlib", - "version": "2.2.2", + "version-string": "zlib-ng", "description": "A compression library", "homepage": "https://github.com/zlib-ng/zlib-ng", "license": "Zlib", "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - { - "name": "vcpkg-cmake-webkit", - "host": true - } + "zlib-ng" ] } diff --git a/triplets/x64-windows-webkit.cmake b/triplets/x64-windows-webkit.cmake index 4a17e4e9..502577b9 100644 --- a/triplets/x64-windows-webkit.cmake +++ b/triplets/x64-windows-webkit.cmake @@ -1,16 +1,15 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) - -# Disable CMake and pkgconfig fixup -set(VCPKG_DISABLE_CMAKE_FIXUP ON) -set(VCPKG_DISABLE_PKGCONFIG_FIXUP ON) - -# The following libraries should always be static -if (PORT MATCHES "highway") - set(VCPKG_LIBRARY_LINKAGE static) -elseif (PORT MATCHES "libwebp") - set(VCPKG_LIBRARY_LINKAGE static) -elseif (PORT MATCHES "pixman") - set(VCPKG_LIBRARY_LINKAGE static) -endif () +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# The following libraries should always be static +if (PORT STREQUAL "highway") + set(VCPKG_LIBRARY_LINKAGE static) +elseif (PORT STREQUAL "pixman") + set(VCPKG_LIBRARY_LINKAGE static) +endif () + +# Turn on zlib compatibility +if (PORT STREQUAL "zlib-ng") + set(ZLIB_COMPAT ON) +endif () diff --git a/triplets/x86-windows-webkit.cmake b/triplets/x86-windows-webkit.cmake deleted file mode 100644 index e058fff1..00000000 --- a/triplets/x86-windows-webkit.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) - -# Disable CMake and pkgconfig fixup -set(VCPKG_DISABLE_CMAKE_FIXUP ON) -set(VCPKG_DISABLE_PKGCONFIG_FIXUP ON) - -# The following libraries should always be static -if (PORT MATCHES "highway") - set(VCPKG_LIBRARY_LINKAGE static) -elseif (PORT MATCHES "libwebp") - set(VCPKG_LIBRARY_LINKAGE static) -elseif (PORT MATCHES "pixman") - set(VCPKG_LIBRARY_LINKAGE static) -endif () diff --git a/versions/baseline.json b/versions/baseline.json new file mode 100644 index 00000000..0ea3d18b --- /dev/null +++ b/versions/baseline.json @@ -0,0 +1,28 @@ +{ + "default": { + "cairo": { + "baseline": "1.18.2", + "port-version": 0 + }, + "curl": { + "baseline": "8.16.0", + "port-version": 1 + }, + "icu": { + "baseline": "77.1.0", + "port-version": 1 + }, + "openssl": { + "baseline": "libressl", + "port-version": 0 + }, + "vcpkg-tool-meson": { + "baseline": "1.9.0", + "port-version": 3 + }, + "zlib": { + "baseline": "zlib-ng", + "port-version": 0 + } + } +} diff --git a/versions/c-/cairo.json b/versions/c-/cairo.json new file mode 100644 index 00000000..e48b3f4e --- /dev/null +++ b/versions/c-/cairo.json @@ -0,0 +1,14 @@ +{ + "versions": [ + { + "git-tree": "d66ade1c9bb9ec902032fad20ac0d975208fedb4", + "version": "1.18.2", + "port-version": 0 + }, + { + "git-tree": "5d5ee0dfe5c31f5d9759ff186e6c88d2ca056bf9", + "version": "1.18.0", + "port-version": 0 + } + ] +} diff --git a/versions/c-/curl.json b/versions/c-/curl.json new file mode 100644 index 00000000..6d850dce --- /dev/null +++ b/versions/c-/curl.json @@ -0,0 +1,39 @@ +{ + "versions": [ + { + "git-tree": "af098084463e145e3bd02bf28f126fb1fccc0f9e", + "version": "8.16.0", + "port-version": 1 + }, + { + "git-tree": "22da8f318769e781d052f3e07db6c81007b85eb1", + "version": "8.13.0", + "port-version": 1 + }, + { + "git-tree": "cc5115020dc054ffead1ff27fb41a39b9ef9c31b", + "version": "8.13.0", + "port-version": 0 + }, + { + "git-tree": "9eeb80d49e86a49bd154c2eb4db3ed07c3352f40", + "version": "8.13.0-rc2", + "port-version": 0 + }, + { + "git-tree": "8df7afbdbc341d47543c075fd44c6d6a4ce1f793", + "version": "8.12.1", + "port-version": 0 + }, + { + "git-tree": "1eb8f8d43289514a0c24119c16ceb542cabe5603", + "version": "8.12.0", + "port-version": 0 + }, + { + "git-tree": "1147a650cb918e5b28de13b4751fe33fdfd32c14", + "version": "8.11.1", + "port-version": 0 + } + ] +} diff --git a/versions/i-/icu.json b/versions/i-/icu.json new file mode 100644 index 00000000..58ef2b7f --- /dev/null +++ b/versions/i-/icu.json @@ -0,0 +1,19 @@ +{ + "versions": [ + { + "git-tree": "34ccf9737b64c2d689e9df0d324f4cb9da0f6054", + "version": "77.1.0", + "port-version": 1 + }, + { + "git-tree": "ea40f10ddf278b30180b541393a9045baebe740c", + "version": "77.1.0", + "port-version": 0 + }, + { + "git-tree": "017ddcb2e0493fecbad3eb52acebc458353ccdb9", + "version": "76.1.0", + "port-version": 0 + } + ] +} diff --git a/versions/o-/openssl.json b/versions/o-/openssl.json new file mode 100644 index 00000000..492905a7 --- /dev/null +++ b/versions/o-/openssl.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "49722904b3d436ac499fc122102558b10ee73be1", + "version-string": "libressl", + "port-version": 0 + } + ] +} diff --git a/versions/v-/vcpkg-tool-meson.json b/versions/v-/vcpkg-tool-meson.json new file mode 100644 index 00000000..652d5de6 --- /dev/null +++ b/versions/v-/vcpkg-tool-meson.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "fda6ad32e62d9157e3329ba556fa973df3a8e05c", + "version": "1.9.0", + "port-version": 3 + } + ] +} diff --git a/versions/z-/zlib.json b/versions/z-/zlib.json new file mode 100644 index 00000000..7af56d0a --- /dev/null +++ b/versions/z-/zlib.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b7e95e97d224d1a520ec9d5246f76c1e52bb4c8c", + "version-string": "zlib-ng", + "port-version": 0 + } + ] +}