From d1784ca25cd6339d30e5b8919e6898a6098ccf1f Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 11 Feb 2023 06:06:35 -0500 Subject: [PATCH] +libjpeg-turbo --- .envrc | 2 + .github/workflows/cd.yml | 2 + .github/workflows/ci.yml | 6 +- .gitignore | 1 + README.md | 108 +++++++++++++++++++++--- projects/libjpeg-turbo.org/fixture.jpeg | Bin 0 -> 305 bytes projects/libjpeg-turbo.org/package.yml | 33 ++++++++ 7 files changed, 139 insertions(+), 13 deletions(-) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 projects/libjpeg-turbo.org/fixture.jpeg create mode 100644 projects/libjpeg-turbo.org/package.yml diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..bfc07d4b --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +export TEA_PANTRY_PATH=$SRCROOT:$HOME/.tea/tea.xyz/var/pantry +export TEA_PREFIX=$SRCROOT/tea.out diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2a20264a..67d8797a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -40,6 +40,7 @@ jobs: with: platform: ${{ matrix.platform }} secrets: inherit + cleanup: needs: [bottle-pr] runs-on: ubuntu-latest @@ -65,6 +66,7 @@ jobs: env: AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }} PR: ${{ needs.bottle.outputs.pr }} + bottle-standalone: runs-on: ubuntu-latest needs: [cd] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78c5c36e..4572848f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,13 @@ jobs: steps: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6 - id: diff + id: get-diff with: PATTERNS: projects/**/package.yml + - id: diff + run: | + RESULT=$(echo ${{ steps.get-diff.outputs.diff }} | sed 's#projects/\(.*\)/.*#\1#') + echo "diff=$RESULT" >> $GITHUB_OUTPUT build: strategy: fail-fast: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9b1e9338 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/tea.out diff --git a/README.md b/README.md index 86c13b96..a8b6f852 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,104 @@ will be maintained by their own communities. > † see [pantry.zero] for “what is a pantry” +# Use with tea/cli + +[tea/cli] clones/updates this pantry and [pantry.core] when installed with +the installer or when you run `tea --sync`. At this time pantries are not +versioned. + +  + # Contributing -See the contributing guide in [pantry.zero][pantry.zero/contributing]. +```sh +$ git clone https://github.com/teaxyz/pantry.extra + +$ cd pantry.extra +# all the following commands operate in `./tea.out` +# your tea installation remains untouched + +$ xc init +# ^^ creates a “wip” package.yml + +$ xc edit +# ^^ opens the new package.yml in your EDITOR + +$ xc build +# ^^ will probably require a (zero permissions) GitHub [PAT]. +# Using `gh auth login` is the easiest way to set this up. + +$ xc test +# ^^ you need to write a test that verifies the package works + +$ gh repo fork +$ git branch -m my-new-package +$ git push origin my-new-package +$ gh pr create +``` + +## Packaging Guide + +Packaging can be cumbersome. +Our [wiki] is our packaging knowledge base. +For other assistance, start a [discussion]. + +## After Your Contribution + +We build “bottles” (tar’d binaries) and upload them to both our centralized +bottle storage and decentralized [IPFS]. + +tea automatically builds new releases of packages *as soon as they are +released* (usually starting the builds within seconds). There is no need to +submit PRs for updates. + +  + + + +# Tasks + +The following can all be run with `xc`, eg. `xc init`. + +## Init + +Creates a new package at `./projects/wip/$RANDOM_TEA_BLEND/package.yml`. + +```sh +tea -E +tea.xyz/brewkit init +``` + +## Edit + +Opens all wip packages in `$EDITOR`. + +```sh +tea -E +tea.xyz/brewkit edit +``` + +## Build + +Builds all wip packages to `./tea.out`. + +```sh +tea -E +tea.xyz/brewkit build +``` + +## Test + +Tests all wip packages. + +```sh +tea -E +tea.xyz/brewkit test +``` + + [pantry.zero]: https://github.com/teaxyz/pantry.zero -[pantry.zero/contributing]: https://github.com/teaxyz/pantry.zero#contributing -[pantry.core]: https://github.com/teaxyz/pantry.core - - -# Dependencies - -We don’t actually need these, but we do for CI/CD currently. - -| Project | Version | -|-------------|---------| -| deno.land | ^1.23 | +[pantry.extra]: https://github.com/teaxyz/pantry.extra +[wiki]: https://github.com/teaxyz/pantry.zero/wiki +[tea/cli]: https://github.com/teaxyz/cli +[discussion]: https://github.com/orgs/teaxyz/discussions +[PAT]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token +[IPFS]: https://ipfs.tech diff --git a/projects/libjpeg-turbo.org/fixture.jpeg b/projects/libjpeg-turbo.org/fixture.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..9a717a0dce28c0556af26eec83ada609191fbe20 GIT binary patch literal 305 zcmex=LJ%Z3btM5{dxG z5Q+={Y5sqJL6C!ik%5t!QILU2kdaxC@&6G95ugYv;0B2bpo=nqM1ej<10YdBOwn5m UJj{$hOPB>2>>2Do)c?N;0ELMmp8x;= literal 0 HcmV?d00001 diff --git a/projects/libjpeg-turbo.org/package.yml b/projects/libjpeg-turbo.org/package.yml new file mode 100644 index 00000000..ecb17eff --- /dev/null +++ b/projects/libjpeg-turbo.org/package.yml @@ -0,0 +1,33 @@ +distributable: + url: https://versaweb.dl.sourceforge.net/project/libjpeg-turbo/{{version}}/libjpeg-turbo-{{version}}.tar.gz + strip-components: 1 + +versions: + github: libjpeg-turbo/libjpeg-turbo + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + cmake.org: ^3 + working-directory: build + script: | + cmake .. $ARGS + make --jobs {{ hw.concurrency }} install + env: + ARGS: + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DCMAKE_BUILD_TYPE=Release + - -DWITH_JPEG8=1 + +provides: + - bin/cjpeg + - bin/djpeg + - bin/jpegtran + - bin/rdjpgcom + - bin/tjbench + - bin/wrjpgcom + +test: | + jpegtran -crop 1x1 -transpose -perfect -outfile out.jpg fixture.jpeg + test -f out.jpg