tkrzw-unofficial 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/extconf.rb +48 -0
  3. data/tkrzw.cc +3167 -0
  4. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4b9b4a7cd12064375ff04c0fbce39b029f70f732ee0540c3f1af43d7ecdeca47
4
+ data.tar.gz: 1ef44bd767564bf0c15a45286cddd739e665c1e791204ca2103d91320679a68d
5
+ SHA512:
6
+ metadata.gz: e5abac3ea4cfaf52b65a7b8fa603f8825ac2a1875cb0da1d268f936e4eea057219e8ad0f824418ef9353aa4abaf3e8d322e70e08ddc0e55e82b6857209573e4c
7
+ data.tar.gz: 6b87aa4393e71465278c864cb959be1009d301369aa1ea81fc9c6c4682c85d5e09e752590fbc571f6dcb847f538c85dad060c16ac302bab842ad234e7ef25a2c
data/extconf.rb ADDED
@@ -0,0 +1,48 @@
1
+ #! /usr/bin/ruby -w
2
+ # -*- coding: utf-8 -*-
3
+ #--------------------------------------------------------------------------------------------------
4
+ # Building configurations
5
+ #
6
+ # Copyright 2020 Google LLC
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
8
+ # except in compliance with the License. You may obtain a copy of the License at
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ # Unless required by applicable law or agreed to in writing, software distributed under the
11
+ # License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
12
+ # either express or implied. See the License for the specific language governing permissions
13
+ # and limitations under the License.
14
+ #--------------------------------------------------------------------------------------------------
15
+
16
+ require "mkmf"
17
+
18
+ File::unlink("Makefile") if File::exist?("Makefile")
19
+ dir_config('tkrzw')
20
+
21
+ home = ENV["HOME"]
22
+ ENV["PATH"] = ENV["PATH"] + ":/usr/local/bin:$home/bin:."
23
+ tkcflags = `tkrzw_build_util config -i 2>/dev/null`.chomp
24
+ tkldflags = `tkrzw_build_util config -l 2>/dev/null`.chomp
25
+ tkldflags = tkldflags.gsub(/-l[\S]+/, "").strip
26
+ tklibs = `tkrzw_build_util config -l 2>/dev/null`.chomp
27
+ tklibs = tklibs.gsub(/-L[\S]+/, "").strip
28
+
29
+ tkcflags = "-I/usr/local/include" if tkcflags.length < 1
30
+ tkldflags = "-L/usr/local/lib" if tkldflags.length < 1
31
+ tklibs = "-ltkrzw -lstdc++ -lrt -latomic -lpthread -lm -lc" if tklibs.length < 1
32
+
33
+ RbConfig::CONFIG["CPP"] = "g++ -std=c++17 -E"
34
+ $CFLAGS = "-std=c++17 -Wno-register -I. #{tkcflags} -Wall #{$CFLAGS} -O2"
35
+ $CXXFLAGS = "-std=c++17 -Wno-register -I. #{tkcflags} -Wall #{$CFLAGS} -O2"
36
+ $LDFLAGS = "#{$LDFLAGS} -L. #{tkldflags}"
37
+ $libs = "#{$libs} #{tklibs}"
38
+
39
+ printf("setting variables ...\n")
40
+ printf(" \$CFLAGS = %s\n", $CFLAGS)
41
+ printf(" \$LDFLAGS = %s\n", $LDFLAGS)
42
+ printf(" \$libs = %s\n", $libs)
43
+
44
+ if have_header('tkrzw_lib_common.h')
45
+ create_makefile('tkrzw')
46
+ end
47
+
48
+ # END OF FILE