+libjpeg-turbo

This commit is contained in:
Max Howell 2023-02-11 06:06:35 -05:00 committed by GitHub
parent eb94320ada
commit d1784ca25c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 139 additions and 13 deletions

2
.envrc Normal file
View file

@ -0,0 +1,2 @@
export TEA_PANTRY_PATH=$SRCROOT:$HOME/.tea/tea.xyz/var/pantry
export TEA_PREFIX=$SRCROOT/tea.out

View file

@ -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]

View file

@ -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

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/tea.out

108
README.md
View file

@ -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” (tard 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 dont 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

View file

@ -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