1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00
nixpkgs/pkgs/tools/security/chaps/insert_prefetches.patch
Thomas Strobel b73e917237 chaps: init at version 0.42-6812
Chaps is a PKCS #11 implementation with TPM backend.
2015-07-04 12:53:09 +02:00

52 lines
2.6 KiB
Diff

diff --git a/makefile b/makefile
index b6865f3..c14f5ec 100644
--- a/makefile
+++ b/makefile
@@ -53,8 +53,8 @@ $(SRCDIR)/include/trousers/scoped_tss_type.h: extrasrc/scoped_tss_type.h | $(SRC
cp $< $@
# Chromium includes <leveldb/memenv.h>. This requires an install of libleveldb-dev that has
# memenv support included; move this into a local leveldb/ subdirectory
-$(SRCDIR)/include/leveldb/memenv.h: /usr/include/leveldb/helpers/memenv.h | $(SRCDIR)/include/leveldb
- cp $< $@
+$(SRCDIR)/include/leveldb/memenv.h: $(SRCDIR)/include/leveldb
+ cp @@NIXOS_LEVELDB@@/include/leveldb/helpers/memenv.h $@
# Chromium includes <include/testing/gtest/include/gtest/gtest_prod.h>, so have a local copy.
$(SRCDIR)/include/testing/gtest/include/gtest/gtest_prod.h: extrasrc/gtest_prod.h | $(SRCDIR)/include/testing/gtest/include/gtest
cp $< $@
@@ -80,7 +80,7 @@ GMOCK_DIR=$(SRCDIR)/gmock-$(GMOCK_VERSION)
GTEST_DIR=$(GMOCK_DIR)/gtest
src_gmock: $(GMOCK_DIR)/LICENSE
$(GMOCK_DIR)/LICENSE: | $(SRCDIR)
- cd $(SRCDIR) && wget $(GMOCK_URL)
+ cd $(SRCDIR) && cp @@NIXOS_SRC_GMOCK@@ gmock-$(GMOCK_VERSION).zip && chmod +w gmock-$(GMOCK_VERSION).zip
cd $(SRCDIR) && unzip -q gmock-$(GMOCK_VERSION).zip
rm $(SRCDIR)/gmock-$(GMOCK_VERSION).zip
touch $@
@@ -107,8 +107,7 @@ src_chromebase: $(SRCDIR)/base/base64.h
$(SRCDIR)/base: | $(SRCDIR)
mkdir -p $@
$(SRCDIR)/base/base64.h: | $(SRCDIR)/base
- git clone $(CHROMEBASE_GIT) $(SRCDIR)/base
- cd $(SRCDIR)/base && git checkout $(CHROMEBASE_COMMIT)
+ cp -r @@NIXOS_SRC_CHROMEBASE@@/. $(SRCDIR)/base && chmod -R +w $(SRCDIR)/base
# We need two subdirectories from the platform2 repository from ChromiumOS:
# - chaps/ for the Chaps source code
@@ -119,14 +118,8 @@ $(SRCDIR)/platform2:
PLATFORM2_GIT=https://chromium.googlesource.com/chromiumos/platform2
PATCHES=$(wildcard $(CURDIR)/patches/platform2/*.patch)
$(SRCDIR)/platform2/chaps/Makefile: | $(SRCDIR)/platform2
- cd $(SRCDIR)/platform2 && git init . && git remote add -f origin $(PLATFORM2_GIT)
- cd $(SRCDIR)/platform2 && git config core.sparsecheckout true
- cd $(SRCDIR)/platform2 && echo "chaps" > .git/info/sparse-checkout
- cd $(SRCDIR)/platform2 && echo "libchromeos/chromeos" >> .git/info/sparse-checkout
- cd $(SRCDIR)/platform2 && echo "common-mk/common.mk" >> .git/info/sparse-checkout
- cd $(SRCDIR)/platform2 && git pull origin master
- cd $(SRCDIR)/platform2 && git checkout $(CROS_BRANCH)
- cd $(SRCDIR)/platform2 && if [ ! -z "$(PATCHES)" ]; then git am $(PATCHES); fi
+ cd $(SRCDIR)/platform2 && cp -r @@NIXOS_SRC_PLATFORM2@@/. . && chmod -R +w $(SRCDIR)/platform2
+ cd $(SRCDIR)/platform2 && if [ ! -z "$(PATCHES)" ]; then patch -p1 < $(PATCHES); fi
# Copy man pages