aboutsummaryrefslogtreecommitdiff
path: root/projects/bucts
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2017-05-31 02:21:11 -0400
committerAndrew Robbins <contact@andrewrobbins.info>2017-05-31 06:24:24 -0400
commit1ea8d09af262ddeed87acf5916cec42d9a002da1 (patch)
tree195dc287813bdf9ee8240092a56f19bbad68dd1e /projects/bucts
parent10aa44585ed4dd1495f47229daa2db4831694c9c (diff)
downloadlibrebootfr-1ea8d09af262ddeed87acf5916cec42d9a002da1.tar.gz
librebootfr-1ea8d09af262ddeed87acf5916cec42d9a002da1.zip
Patching now works. bucts can be patched & built.
Modified the function git_project_patch_recursive (in libs/git) to enable patching with diff files, which uses the new function diff_patch_file located in libs/common. A generic action script for bucts is in projects/bucts/. Install/revision/target files are in projects/bucts/configs/. bucts' merge into the new build system should be nearly, if not already, complete.
Diffstat (limited to 'projects/bucts')
-rw-r--r--projects/bucts/bucts110
-rw-r--r--projects/bucts/configs/install1
-rw-r--r--projects/bucts/configs/revision1
-rw-r--r--projects/bucts/configs/targets2
-rw-r--r--projects/bucts/patches/0001-Makefile-don-t-use-git.patch24
-rw-r--r--projects/bucts/patches/staticlink.diff13
6 files changed, 151 insertions, 0 deletions
diff --git a/projects/bucts/bucts b/projects/bucts/bucts
new file mode 100644
index 00000000..02766f8e
--- /dev/null
+++ b/projects/bucts/bucts
@@ -0,0 +1,110 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+arguments() {
+ project_arguments_targets "${project}" "$@"
+}
+
+usage() {
+ project_usage_actions "${project}"
+ project_usage_arguments "${project}" "$@"
+}
+
+download() {
+ local repository="${project}"
+
+ project_download_git "${project}" "${repository}" 'git://git.stuge.se/bucts.git' "$@"
+}
+
+download_check() {
+ local repository="${project}"
+
+ project_download_check_git "${project}" "${repository}" "$@"
+}
+
+extract() {
+ local repository="${project}"
+
+ project_extract "${project}" "$@"
+}
+
+extract_check() {
+ local repository="${project}"
+
+ project_extract_check "${project}" "$@"
+}
+
+update() {
+ local repository="${project}"
+
+ project_update_git "${project}" "${repository}" "$@"
+}
+
+update_check() {
+ local repository="${project}"
+
+ project_update_check_git "${project}" "${repository}" "$@"
+}
+
+build() {
+ local repository="${project}"
+
+ project_sources_directory_missing_empty_error "${project}" "${repository}" "$@"
+
+ if git_project_check "${repository}"; then
+ git_project_checkout "${project}" "${repository}" "$@"
+ fi
+
+ local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
+
+ local build_path="$(project_build_path "${project}" "$@")"
+
+ mkdir -p "${build_path}"
+ make -C "${sources_path}" -j"${TASKS}"
+ cp "${sources_path}/bucts" "${build_path}"
+ make -C "${sources_path}" 'clean'
+}
+
+build_check() {
+ project_build_check "${project}" "$@"
+}
+
+install() {
+ project_install "${project}" "$@"
+}
+
+install_check() {
+ project_install_check "${project}" "$@"
+}
+
+release() {
+ local repository="${project}"
+
+ project_release_install_archive "${project}" "${TOOLS}" "$@"
+ project_release_sources_git "${project}" "${repository}" "$@"
+}
+
+release_check() {
+ local repository="bucts"
+
+ project_release_install_archive_check "${project}" "${TOOLS}" "$@"
+ project_release_check_sources_git "${project}" "${repository}" "$@"
+}
+
+clean() {
+ project_clean "${project}" "$@"
+}
diff --git a/projects/bucts/configs/install b/projects/bucts/configs/install
new file mode 100644
index 00000000..28b72bcb
--- /dev/null
+++ b/projects/bucts/configs/install
@@ -0,0 +1 @@
+bucts:bucts
diff --git a/projects/bucts/configs/revision b/projects/bucts/configs/revision
new file mode 100644
index 00000000..1ac89ef2
--- /dev/null
+++ b/projects/bucts/configs/revision
@@ -0,0 +1 @@
+dc27919d7a66a6e8685ce07c71aefa4f03ef7c07
diff --git a/projects/bucts/configs/targets b/projects/bucts/configs/targets
new file mode 100644
index 00000000..915652d5
--- /dev/null
+++ b/projects/bucts/configs/targets
@@ -0,0 +1,2 @@
+generic
+lenovobios
diff --git a/projects/bucts/patches/0001-Makefile-don-t-use-git.patch b/projects/bucts/patches/0001-Makefile-don-t-use-git.patch
new file mode 100644
index 00000000..9a0e719c
--- /dev/null
+++ b/projects/bucts/patches/0001-Makefile-don-t-use-git.patch
@@ -0,0 +1,24 @@
+From 63312528ea81207865077ab2c75963e3660859f0 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <info@minifree.org>
+Date: Sat, 14 Feb 2015 00:56:43 +0000
+Subject: [PATCH] Makefile: don't use git
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 68541e6..b5f43d5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ CC:=gcc
+ OBJ:=bucts.o
+-VERSION:=$(shell git describe)
++VERSION:=withoutgit
+
+ ifeq ($(shell uname), FreeBSD)
+ CFLAGS = -I/usr/local/include
+--
+1.9.1
+
diff --git a/projects/bucts/patches/staticlink.diff b/projects/bucts/patches/staticlink.diff
new file mode 100644
index 00000000..52da8cc8
--- /dev/null
+++ b/projects/bucts/patches/staticlink.diff
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 68541e6..b8579eb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,7 +10,7 @@ endif
+ all: bucts
+
+ bucts: $(OBJ)
+- $(CC) -o $@ $(OBJ) $(LDFLAGS) -lpci
++ $(CC) -o $@ $(OBJ) $(LDFLAGS) -lpci -lz -static
+
+ %.o: %.c
+ $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -c $<