Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ C_SRC := $(shell pwd)/c_src
CPPFLAGS := -shared -fPIC -fvisibility=hidden -std=c++17 -Wall -Wextra -Wno-unused-parameter -Wno-comment
CPPFLAGS += -I$(ERTS_INCLUDE_DIR) -I$(FINE_INCLUDE_DIR)

LEXBOR_DIR := $(shell pwd)/_build/c/third_party/lexbor/$(LEXBOR_VERSION)
LEXBOR_DIR := $(shell pwd)/_build/c/third_party/lexbor/$(LEXBOR_GIT_SHA)
ifdef CC_PRECOMPILER_CURRENT_TARGET
LEXBOR_BUILD_DIR := $(LEXBOR_DIR)/build-$(CC_PRECOMPILER_CURRENT_TARGET)
else
Expand Down Expand Up @@ -47,4 +47,7 @@ $(LEXBOR_LIB): $(LEXBOR_DIR)
cmake --build .

$(LEXBOR_DIR):
@ git clone --depth 1 --branch v$(LEXBOR_VERSION) https://github.com/lexbor/lexbor.git $(LEXBOR_DIR)
@ git clone --depth 1 https://github.com/lexbor/lexbor.git $(LEXBOR_DIR) && \
cd $(LEXBOR_DIR) && \
git fetch --depth 1 origin $(LEXBOR_GIT_SHA) && \
git checkout $(LEXBOR_GIT_SHA)
7 changes: 5 additions & 2 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ C_SRC=$(MAKEDIR)\c_src
CPPFLAGS=/LD /std:c++17 /W4 /wd4100 /wd4458 /O2 /EHsc
CPPFLAGS=$(CPPFLAGS) /I"$(ERTS_INCLUDE_DIR)" /I"$(FINE_INCLUDE_DIR)"

LEXBOR_DIR=$(MAKEDIR)\_build\c\third_party\lexbor\$(LEXBOR_VERSION)
LEXBOR_DIR=$(MAKEDIR)\_build\c\third_party\lexbor\$(LEXBOR_GIT_SHA)
!ifdef CC_PRECOMPILER_CURRENT_TARGET
LEXBOR_BUILD_DIR=$(LEXBOR_DIR)\build-$(CC_PRECOMPILER_CURRENT_TARGET)
!else
Expand Down Expand Up @@ -40,4 +40,7 @@ $(LEXBOR_LIB): $(LEXBOR_DIR)
cmake --build .

$(LEXBOR_DIR):
@ git clone --depth 1 --branch v$(LEXBOR_VERSION) https://github.com/lexbor/lexbor.git $(LEXBOR_DIR)
@ git clone --depth 1 https://github.com/lexbor/lexbor.git $(LEXBOR_DIR) && \
cd $(LEXBOR_DIR) && \
git fetch --depth 1 origin $(LEXBOR_GIT_SHA) && \
git checkout $(LEXBOR_GIT_SHA)
3 changes: 3 additions & 0 deletions c_src/lazy_html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include <variant>

#include <lexbor/html/html.h>
#include <lexbor/css/css.h>
#include <lexbor/selectors/selectors.h>
#include <lexbor/dom/dom.h>

namespace lazy_html {

Expand Down
5 changes: 3 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
defmodule LazyHTML.MixProject do
use Mix.Project

@lexbor_version "2.4.0"
# v2.5.0 + :lexbor-contains() feature
@lexbor_git_sha "244b84956a6dc7eec293781d051354f351274c46"

@version "0.1.7-dev"
@description "Efficient parsing and querying of HTML documents"
Expand All @@ -21,7 +22,7 @@ defmodule LazyHTML.MixProject do
make_env: fn ->
%{
"FINE_INCLUDE_DIR" => Fine.include_dir(),
"LEXBOR_VERSION" => @lexbor_version
"LEXBOR_GIT_SHA" => @lexbor_git_sha
}
end,
# Precompilation
Expand Down