Skip to content

Commit

Permalink
remove perl package deps (they are now vendored in by golpe)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoytech committed Jul 19, 2024
1 parent c0dec7c commit 233c50c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
run: |
sudo apt update && sudo apt install -y --no-install-recommends \
git g++ make pkg-config libtool ca-certificates \
libyaml-perl libtemplate-perl libregexp-grammars-perl libssl-dev zlib1g-dev \
liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev
libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev
git submodule update --init
make setup-golpe
make -j4
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ RUN \
pkgconfig \
libtool \
ca-certificates \
perl-yaml \
perl-template-toolkit \
perl-app-cpanminus \
libressl-dev \
zlib-dev \
lmdb-dev \
flatbuffers-dev \
libsecp256k1-dev \
zstd-dev \
&& rm -rf /var/cache/apk/* \
&& cpanm Regexp::Grammars \
&& git submodule update --init \
&& make setup-golpe \
&& make -j4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ LDLIBS += -lsecp256k1 -lzstd
INCS += -Iexternal/negentropy/cpp

build/StrfryTemplates.h: $(shell find src/tmpls/ -type f -name '*.tmpl')
perl golpe/external/templar/templar.pl src/tmpls/ strfrytmpl $@
PERL5LIB=golpe/vendor/ perl golpe/external/templar/templar.pl src/tmpls/ strfrytmpl $@

src/apps/relay/RelayWebsocket.o: build/StrfryTemplates.h
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ A C++20 compiler is required, along with a few other common dependencies. On Deb

#### Linux

sudo apt install -y git build-essential libyaml-perl libtemplate-perl libregexp-grammars-perl libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev
sudo apt install -y git g++ make libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev
git clone https://github.com/hoytech/strfry && cd strfry/
git submodule update --init
make setup-golpe
make -j4

#### FreeBSD

pkg install -y gcc gmake cmake git perl5 openssl lmdb flatbuffers libuv libinotify zstr secp256k1 zlib-ng p5-Regexp-Grammars p5-Module-Install-Template p5-YAML
pkg install -y gcc gmake cmake git perl5 openssl lmdb flatbuffers libuv libinotify zstr secp256k1 zlib-ng
git clone https://github.com/hoytech/strfry && cd strfry/
git submodule update --init
gmake setup-golpe
Expand Down
5 changes: 0 additions & 5 deletions arch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm \
# build essentials
base-devel git \
# perl stuff
cpanminus perl-template-toolkit perl-yaml \
# flatbuffers, lmdb, libsecp256k1
flatbuffers lmdb libsecp256k1

# necessary perl pod
RUN /usr/bin/vendor_perl/cpanm Regexp::Grammars

# update submodules
RUN git submodule update --init

Expand Down
2 changes: 1 addition & 1 deletion golpe
Submodule golpe updated 58 files
+2 −0 LoadGolpe.pm
+1 −1 external/hoytech-cpp
+3 −3 gen-config.pl
+0 −0 gen-fbs.pl
+4 −4 gen-golpe.h.pl
+3 −3 gen-main.cpp.pl
+19 −4 golpe.h.tt
+24 −0 if-feature.pl
+17 −10 main.cpp.tt
+0 −0 pre-build.pl
+20 −14 rules.mk
+6,926 −0 vendor/Regexp/Grammars.pm
+935 −0 vendor/Template.pm
+283 −0 vendor/Template/Base.pm
+429 −0 vendor/Template/Config.pm
+265 −0 vendor/Template/Constants.pm
+1,550 −0 vendor/Template/Context.pm
+1,069 −0 vendor/Template/Directive.pm
+537 −0 vendor/Template/Document.pm
+229 −0 vendor/Template/Exception.pm
+849 −0 vendor/Template/Filters.pm
+6,237 −0 vendor/Template/Grammar.pm
+493 −0 vendor/Template/Iterator.pm
+176 −0 vendor/Template/Namespace/Constants.pm
+1,221 −0 vendor/Template/Parser.pm
+369 −0 vendor/Template/Plugin.pm
+465 −0 vendor/Template/Plugins.pm
+1,399 −0 vendor/Template/Provider.pm
+573 −0 vendor/Template/Service.pm
+890 −0 vendor/Template/Stash.pm
+773 −0 vendor/Template/Stash/Context.pm
+137 −0 vendor/Template/Stash/XS.pm
+720 −0 vendor/Template/Test.pm
+146 −0 vendor/Template/Toolkit.pm
+694 −0 vendor/Template/VMethods.pm
+747 −0 vendor/Template/View.pm
+117 −0 vendor/YAML.pm
+123 −0 vendor/YAML/Any.pm
+165 −0 vendor/YAML/Any.pod
+578 −0 vendor/YAML/Dumper.pm
+38 −0 vendor/YAML/Dumper.pod
+111 −0 vendor/YAML/Dumper/Base.pm
+35 −0 vendor/YAML/Dumper/Base.pod
+191 −0 vendor/YAML/Error.pm
+35 −0 vendor/YAML/Error.pod
+839 −0 vendor/YAML/Loader.pm
+39 −0 vendor/YAML/Loader.pod
+38 −0 vendor/YAML/Loader/Base.pm
+35 −0 vendor/YAML/Loader/Base.pod
+47 −0 vendor/YAML/Marshall.pm
+36 −0 vendor/YAML/Marshall.pod
+80 −0 vendor/YAML/Mo.pm
+218 −0 vendor/YAML/Node.pm
+91 −0 vendor/YAML/Node.pod
+19 −0 vendor/YAML/Tag.pm
+34 −0 vendor/YAML/Tag.pod
+240 −0 vendor/YAML/Types.pm
+38 −0 vendor/YAML/Types.pod
11 changes: 8 additions & 3 deletions golpe.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
appName: strfry
onAppStartup: true
useGlobalH: true
customLMDBSetup: true
features:
ssl: true
config: true
onAppStartup: true
db: true
customLMDBSetup: true
flatbuffers: true
websockets: true

flatBuffers: |
include "../fbs/nostr-index.fbs";
Expand Down
3 changes: 1 addition & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
with pkgs;
mkShell {
buildInputs = [
perl perlPackages.YAML perlPackages.TemplateToolkit perlPackages.RegexpGrammars
lmdb zstd secp256k1 flatbuffers zlib openssl libuv
perl lmdb zstd secp256k1 flatbuffers zlib openssl libuv
];
}
5 changes: 2 additions & 3 deletions ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ ENV TZ=Europe/London
WORKDIR /build
RUN apt update && apt install -y --no-install-recommends \
git g++ make pkg-config libtool ca-certificates \
libyaml-perl libtemplate-perl libregexp-grammars-perl libssl-dev zlib1g-dev \
liblmdb-dev libflatbuffers-dev libsecp256k1-dev \
libzstd-dev
libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev \
libsecp256k1-dev libzstd-dev

COPY . .
RUN git submodule update --init
Expand Down

0 comments on commit 233c50c

Please sign in to comment.