Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
# Ignore BPM archives and signatures
|
||||||
|
*.bpm
|
||||||
|
*.bpm.sig
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "ignore"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
name: gn
|
||||||
|
description: Meta-build system that generates build files for Ninja
|
||||||
|
version: 2026.02.05
|
||||||
|
revision: 1
|
||||||
|
url: https://gn.googlesource.com/gn/
|
||||||
|
license: BSD-3-Clause
|
||||||
|
maintainers:
|
||||||
|
- [email protected]
|
||||||
|
architecture: any
|
||||||
|
type: source
|
||||||
|
depends:
|
||||||
|
- gcc-libs
|
||||||
|
make_depends:
|
||||||
|
- clang
|
||||||
|
- ninja
|
||||||
|
- python3
|
||||||
|
downloads:
|
||||||
|
- url: https://gn.googlesource.com/gn/+archive/304bbef6c7e9a86630c12986b99c8654eb7fe648.tar.gz
|
||||||
|
extract_to: ${BPM_SOURCE}
|
||||||
|
checksum: skip
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||||
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
|
# The prepare function is executed in the root of the temp directory
|
||||||
|
# This function is used for putting downloaded files to the correct location or applying patches
|
||||||
|
prepare() {
|
||||||
|
cat > "$BPM_SOURCE"/src/gn/last_commit_position.h <<EOF
|
||||||
|
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||||
|
#define OUT_LAST_COMMIT_POSITION_H_
|
||||||
|
|
||||||
|
#define LAST_COMMIT_POSITION_NUM 0
|
||||||
|
#define LAST_COMMIT_POSITION "0 (304bbef6c7e9a86630c12986b99c8654eb7fe648)"
|
||||||
|
|
||||||
|
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||||
|
EOF
|
||||||
|
|
||||||
|
"$BPM_SOURCE"/build/gen.py --no-last-commit-position --no-static-libstdc++ --no-strip --allow-warnings
|
||||||
|
}
|
||||||
|
|
||||||
|
# The build function is executed in the source directory
|
||||||
|
# This function is used to compile the source code
|
||||||
|
build() {
|
||||||
|
ninja -C out
|
||||||
|
}
|
||||||
|
|
||||||
|
# The check function is executed in the source directory
|
||||||
|
# This function is used to run tests to verify the package has been compiled correctly
|
||||||
|
check() {
|
||||||
|
./out/gn_unittests
|
||||||
|
}
|
||||||
|
|
||||||
|
# The package function is executed in the source directory
|
||||||
|
# This function is used to move the compiled files into the output directory
|
||||||
|
package() {
|
||||||
|
install -Dm644 out/gn "$BPM_OUTPUT"/usr/bin/gn
|
||||||
|
|
||||||
|
# Install documentation
|
||||||
|
install -Dm644 docs/* -t "$BPM_OUTPUT"/usr/share/doc/gn/
|
||||||
|
|
||||||
|
# Install vim plugins
|
||||||
|
install -d "$BPM_OUTPUT"/usr/share/vim/vimfiles
|
||||||
|
cp -r misc/vim/{autoload,ftdetect,ftplugin,syntax} -t "$BPM_OUTPUT"/usr/share/vim/vimfiles
|
||||||
|
|
||||||
|
# Install emacs plugin
|
||||||
|
install -Dm644 misc/emacs/gn-mode.el "$BPM_OUTPUT"/usr/share/emacs/site-lisp/gn-mode.el
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/gn/LICENSE
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user