Skip to content

Commit

Permalink
add buck
Browse files Browse the repository at this point in the history
  • Loading branch information
michalgr committed Sep 10, 2022
1 parent b3bd92d commit 146fb81
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/buck/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
buck
https://buck.build/

github: https://github.com/facebook/buck
license: Apache 2.0
license url: https://github.com/facebook/buck/blob/main/LICENSE

Default version: v2022.05.05.01
30 changes: 30 additions & 0 deletions projects/buck/build.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.

ANT_VERSION = 1.9.16

BUCK_HOST_DEPS = python
$(eval $(call project-define,buck))

$(BUCK_HOST): \
export PATH:=$(abspath $(BUCK_HOST_BUILD_DIR))/bin:$(PATH)
$(BUCK_HOST):
cd $(BUCK_SRCS) && $(abspath $(BUCK_HOST_BUILD_DIR)/apache-ant-$(ANT_VERSION)/bin/ant)
cd $(BUCK_SRCS) && ./bin/buck build buck --out=$(abspath $(HOST_OUT_DIR)/bin/buck)
touch $@

$(BUCK_HOST_BUILD_DIR): $(DOWNLOADS_DIR)/apache-ant-$(ANT_VERSION)-bin.zip
mkdir $@
mkdir $@/bin
ln -s $(abspath $(HOST_OUT_DIR)/bin/python3) $@/bin/python
cd $@ && unzip $(abspath $(DOWNLOADS_DIR)/apache-ant-$(ANT_VERSION)-bin.zip)

ANT_URL = https://dlcdn.apache.org//ant/binaries/apache-ant-$(ANT_VERSION)-bin.zip
$(DOWNLOADS_DIR)/apache-ant-$(ANT_VERSION)-bin.zip:
wget -q -P $(DOWNLOADS_DIR) $(ANT_URL)

BUCK_REPO = https://github.com/facebook/buck.git
BUCK_VERSION = v2022.05.05.01
projects/buck/sources:
git clone $(BUCK_REPO) --depth 1 \
--branch $(BUCK_VERSION) \
$@
2 changes: 2 additions & 0 deletions scripts/jammy-install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ apt-get install -y \
libssl-dev \
libtool \
make \
openjdk-8-jdk \
openjdk-8-jre \
pkg-config \
po4a \
texinfo \
Expand Down

0 comments on commit 146fb81

Please sign in to comment.