Skip to content

Commit 7cef74a

Browse files
committed
Fix autopatch of erlang-rocksdb
Thanks Ilya Khaprov for the fix.
1 parent 973ccc3 commit 7cef74a

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ jobs:
301301
- '^cowboy \|^cowlib \|^gun \|^ranch '
302302
- '^amqp_client \|^amqp10_client \|^aten \|^credentials_obfuscation \|^cuttlefish '
303303
- '^gen_batch_server \|^ra \|^seshat \|^stdout_formatter \|^sysmon_handler '
304+
- '^rocksdb '
304305
extra: ['', 'LEGACY=1']
305306
runs-on: ${{ matrix.os }}
306307
steps:

core/deps.mk

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,11 @@ define dep_autopatch_rebar.erl
531531
Write(io_lib:format("COMPILE_FIRST +=~s\n", [Names]))
532532
end
533533
end(),
534-
Write("\n\nrebar_dep: preprocess pre-deps deps pre-app app\n"),
534+
Write("\n\nrebar_dep: preprocess pre-deps deps pre-app app post-app\n"),
535535
Write("\npreprocess::\n"),
536536
Write("\npre-deps::\n"),
537537
Write("\npre-app::\n"),
538+
Write("\npost-app::\n"),
538539
PatchHook = fun(Cmd) ->
539540
Cmd2 = re:replace(Cmd, "^([g]?make)(.*)( -C.*)", "\\\\1\\\\3\\\\2", [{return, list}]),
540541
case Cmd2 of
@@ -565,6 +566,24 @@ define dep_autopatch_rebar.erl
565566
end || H <- Hooks]
566567
end
567568
end(),
569+
fun() ->
570+
case lists:keyfind(post_hooks, 1, Conf) of
571+
false -> ok;
572+
{_, Hooks} ->
573+
[case H of
574+
{compile, Cmd} ->
575+
Write("\npost-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");
576+
{{pc, compile}, Cmd} ->
577+
Write("\npost-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");
578+
{Regex, compile, Cmd} ->
579+
case rebar_utils:is_arch(Regex) of
580+
true -> Write("\npost-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");
581+
false -> ok
582+
end;
583+
_ -> ok
584+
end || H <- Hooks]
585+
end
586+
end(),
568587
ShellToMk = fun(V0) ->
569588
V1 = re:replace(V0, "[$$][(]", "$$\(shell ", [global]),
570589
V = re:replace(V1, "([$$])(?![(])(\\\\w*)", "\\\\1(\\\\2)", [global]),

test/hexpm_packages.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ rlamb_publishtest 0.1.0
16411641
rlp 1.1.0
16421642
rmpc 18.5.9
16431643
robots 1.1.2
1644-
rocksdb 1.8.0
1644+
rocksdb 1.9.0
16451645
rocksdb_cloud 1.0.1
16461646
roni 1.0.1
16471647
roster 3.4.0

0 commit comments

Comments
 (0)