Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
3.9 KiB

diff --git a/.gitignore b/.gitignore
index 8632252..1f93efd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,23 @@ lib
*.swp
*.swo
tmux-*.log
+native-src/zxcvbn/_frequency_lists.cpp
+native-src/zxcvbn/_frequency_lists.hpp
+native-src/zxcvbn/adjacency_graphs.cpp
+native-src/zxcvbn/adjacency_graphs.hpp
+native-src/zxcvbn/m4
+native-src/zxcvbn/autom4te.cache
+native-src/zxcvbn/config.log
+native-src/zxcvbn/config.status
+native-src/zxcvbn/config
+native-src/zxcvbn/configure
+native-src/zxcvbn/libtool
+native-src/zxcvbn/aclocal.m4
+native-src/zxcvbn/Makefile.in
+native-src/zxcvbn/Makefile
+native-src/zxcvbn/*.o
+native-src/zxcvbn/*.lo
+native-src/zxcvbn/*.la
+native-src/zxcvbn/.deps
+native-src/zxcvbn/.libs
+native-src/zxcvbn/zxcvbncpp.pc
diff --git a/native-src/zxcvbn/Makefile.am b/native-src/zxcvbn/Makefile.am
new file mode 100644
index 0000000..1620cda
--- /dev/null
+++ b/native-src/zxcvbn/Makefile.am
@@ -0,0 +1,45 @@
+ACLOCAL_AMFLAGS = -I m4 --install
+
+CXXFLAGS = -std=c++14
+
+lib_LTLIBRARIES = libzxcvbncpp.la
+
+libzxcvbncpp_la_SOURCES = feedback.cpp frequency_lists.cpp matching.cpp \
+ scoring.cpp time_estimates.cpp util.cpp \
+ zxcvbn.cpp _frequency_lists.cpp \
+ adjacency_graphs.cpp
+
+libzxcvbncpp_la_LDFLAGS = -version-info \
+ @ZXCVBNCPP_LT_CURRENT@:@ZXCVBNCPP_LT_REVISION@:@ZXCVBNCPP_LT_AGE@
+
+incdir = $(includedir)/zxcvbn
+inc_HEADERS = common.hpp feedback.hpp frequency_lists.hpp \
+ frequency_lists_common.hpp matching.hpp optional.hpp \
+ scoring.hpp time_estimates.hpp util.hpp zxcvbn.h \
+ _frequency_lists.hpp adjacency_graphs.hpp
+
+pkgconfig_DATA = zxcvbncpp.pc
+
+BUILT_SOURCES = _frequency_lists.hpp _frequency_lists.cpp \
+ adjacency_graphs.hpp adjacency_graphs.cpp
+
+CLEANFILES = $(BUILT_SOURCES)
+
+scripts_dir = $(top_srcdir)/../../data-scripts
+data_dir = $(top_srcdir)/../../data
+
+_frequency_lists.hpp:
+ $(scripts_dir)/build_frequency_lists.py $(data_dir) \
+ _frequency_lists.hpp
+
+_frequency_lists.cpp:
+ $(scripts_dir)/build_frequency_lists.py $(data_dir) \
+ _frequency_lists.cpp
+
+adjacency_graphs.hpp:
+ $(scripts_dir)/build_keyboard_adjacency_graphs.py \
+ adjacency_graphs.hpp
+
+adjacency_graphs.cpp:
+ $(scripts_dir)/build_keyboard_adjacency_graphs.py \
+ adjacency_graphs.cpp
diff --git a/native-src/zxcvbn/configure.ac b/native-src/zxcvbn/configure.ac
new file mode 100644
index 0000000..4c88e16
--- /dev/null
+++ b/native-src/zxcvbn/configure.ac
@@ -0,0 +1,36 @@
+dnl Configure template for the zxcvbn C++ library
+
+AC_INIT([zxcvbncpp], [0.1.0], [rian@alum.mit.edu])
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE([foreign])
+PKG_INSTALLDIR
+
+AC_PROG_CXX
+AC_PROG_INSTALL
+LT_INIT
+
+dnl Libtool version numbers
+dnl How to update:
+dnl Interfaces removed: CURRENT++, AGE=0, REVISION=0
+dnl Interfaces added: CURRENT++, AGE++, REVISION=0
+dnl No interfaces changed: REVISION++
+ZXCVBNCPP_LT_CURRENT=0
+ZXCVBNCPP_LT_AGE=0
+ZXCVBNCPP_LT_REVISION=0
+
+AC_SUBST(ZXCVBNCPP_LT_CURRENT)
+AC_SUBST(ZXCVBNCPP_LT_AGE)
+AC_SUBST(ZXCVBNCPP_LT_REVISION)
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [Compile with debugging support])],
+ [], [enable_debug=no])
+AS_IF([test "x$enable_debug" != xyes],
+ [AC_DEFINE([NDEBUG], [1])],
+ [CPPFLAGS="${CPPFLAGS} -g -O0"])
+
+AC_CONFIG_FILES([Makefile zxcvbncpp.pc])
+AC_OUTPUT
diff --git a/native-src/zxcvbn/zxcvbncpp.pc.in b/native-src/zxcvbn/zxcvbncpp.pc.in
new file mode 100644
index 0000000..183e144
--- /dev/null
+++ b/native-src/zxcvbn/zxcvbncpp.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Zxcvbn-cpp
+Description: Password strength estimation library
+Version: @VERSION@
+URL: https://github.com/rianhunter/zxcvbn-cpp
+Libs: -L${libdir} -lzxcvbncpp
+Cflags: -I${includedir}